stop trying to set permissions in check mode

fixes #4195
This commit is contained in:
Brian Coca 2016-07-15 11:42:10 -04:00 committed by Matt Clay
parent 498dc61154
commit 544b044129

View file

@ -340,8 +340,9 @@ def main():
res_args['backup_file'] = backup_file
module.params['dest'] = dest
file_args = module.load_file_common_arguments(module.params)
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
if not module.check_mode:
file_args = module.load_file_common_arguments(module.params)
res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed'])
module.exit_json(**res_args)