Do not use a default value for -n parameter, fix #1400 (#1417)

reviewable/pr18780/r1
Michael Scherer 9 years ago committed by René Moser
parent bd0deed367
commit 84ca3ba7ee

@ -144,7 +144,9 @@ class RabbitMqUser(object):
def _exec(self, args, run_in_check_mode=False):
if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
cmd = [self._rabbitmqctl, '-q', '-n', self.node]
cmd = [self._rabbitmqctl, '-q']
if self.node is not None:
cmd.append(['-n', self.node])
rc, out, err = self.module.run_command(cmd + args, check_rc=True)
return out.splitlines()
return list()
@ -235,7 +237,7 @@ def main():
read_priv=dict(default='^$'),
force=dict(default='no', type='bool'),
state=dict(default='present', choices=['present', 'absent']),
node=dict(default='rabbit')
node=dict(default=None)
)
module = AnsibleModule(
argument_spec=arg_spec,

Loading…
Cancel
Save