diff --git a/plugins/modules/pacemaker_resource.py b/plugins/modules/pacemaker_resource.py index 1842922c7fe..42071d672a8 100644 --- a/plugins/modules/pacemaker_resource.py +++ b/plugins/modules/pacemaker_resource.py @@ -87,7 +87,6 @@ description: - Actions to associate with resource type: dict - default: {} suboptions: argument_action: description: @@ -121,9 +120,15 @@ state: create name: virtual-ip resource_type: - name: IPaddr2 + resource_name: IPaddr2 resource_option: "ip=[192.168.1.2]" - group: master + resource_arguments: + argument_action: group + argument_option: + - master + resource_operation: + operation_action: monitor + operation_option: interval=20 ''' RETURN = ''' @@ -132,10 +137,9 @@ type: bool returned: always out: - description: The output of the current state of the cluster. It return a - list of the nodes state. + description: The output of the resource state of the cluster. type: str - sample: 'out: [[" overcloud-controller-0", " Online"]]}' + sample: 'out: [[" Assumed agent name ocf:heartbeat:IPaddr2 (deduced from IPaddr2)"]]}' returned: always rc: description: exit code of the module @@ -191,7 +195,9 @@ def create_cluster_resource(module, resource_name, for m in resource_meta: cmd += "meta %s " % m - if resource_arguments: + if resource_arguments is not None: + if resource_arguments.get('argument_action') == "group": + cmd += "--" cmd += "%s " % resource_arguments.get('argument_action') for option_argument in resource_arguments.get('argument_option'): cmd += "%s " % option_argument @@ -225,7 +231,7 @@ def main(): operation_option=dict(type='str', default=None), )), resource_meta=dict(type='list', elements='str', default=None), - resource_arguments=dict(type='dict', default=dict(), options=dict( + resource_arguments=dict(type='dict', default=None, options=dict( argument_action=dict(type='str', default=None, choices=['clone', 'master', 'group']), argument_option=dict(type='list', elements='str', default=None), )),