Skip to content

Commit

Permalink
Do not run systemctl daemon-reload in check mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kustodian authored and bcoca committed Oct 5, 2017
1 parent fad3a4d commit 7417282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/system/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def main():
module.fail_json(msg="name is also required when specifying %s" % requires)

# Run daemon-reload first, if requested
if module.params['daemon_reload']:
if module.params['daemon_reload'] and not module.check_mode:
(rc, out, err) = module.run_command("%s daemon-reload" % (systemctl))
if rc != 0:
module.fail_json(msg='failure %d during daemon-reload: %s' % (rc, err))
Expand Down

0 comments on commit 7417282

Please sign in to comment.