mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 06:13:21 +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.location = options.automount_location
|
||||
|
||||
changed = False
|
||||
if options.automount_location:
|
||||
changed = True
|
||||
argspec = getargspec(configure_automount)
|
||||
if len(argspec.args) > 1:
|
||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||
@@ -109,7 +111,7 @@ def main():
|
||||
else:
|
||||
configure_automount(options)
|
||||
|
||||
module.exit_json(changed=True)
|
||||
module.exit_json(changed=changed)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user