mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
ipaclient_setup_automount: Only return changed if there was a change
The returned changed state was always True. changed is now only True if automount_location is set and configure_automount was called.
This commit is contained in:
@@ -95,7 +95,9 @@ def main():
|
|||||||
options.automount_location = module.params.get('automount_location')
|
options.automount_location = module.params.get('automount_location')
|
||||||
options.location = options.automount_location
|
options.location = options.automount_location
|
||||||
|
|
||||||
|
changed = False
|
||||||
if options.automount_location:
|
if options.automount_location:
|
||||||
|
changed = True
|
||||||
argspec = getargspec(configure_automount)
|
argspec = getargspec(configure_automount)
|
||||||
if len(argspec.args) > 1:
|
if len(argspec.args) > 1:
|
||||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||||
@@ -109,7 +111,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
configure_automount(options)
|
configure_automount(options)
|
||||||
|
|
||||||
module.exit_json(changed=True)
|
module.exit_json(changed=changed)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user