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:
Thomas Woerner
2024-02-07 14:39:34 +01:00
parent 0a468d32e8
commit 0d1f8b53b8

View File

@@ -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__':