Skip to content

Instantly share code, notes, and snippets.

@seocam
Created March 4, 2020 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seocam/06eebf4bb998ca04e185deb9c12d6e20 to your computer and use it in GitHub Desktop.
Save seocam/06eebf4bb998ca04e185deb9c12d6e20 to your computer and use it in GitHub Desktop.
# Execute command only if configuration changes.
if not compare_args_ipa(ansible_module, args, res_find):
try:
api_command_no_name(ansible_module, 'dnsconfig_mod', args)
except Exception as e:
msg = str(e)
ansible_module.fail_json(msg="dnsconfig_mod: %s" % msg)
else:
# If command did not fail, something changed.
changed = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment