From 3caea2e89025a38c0048e202336526072212e2f2 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 23 May 2014 16:09:57 -0700 Subject: [PATCH 1/2] Fix typo in variable name --- library/packaging/rhn_register | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/packaging/rhn_register b/library/packaging/rhn_register index 2282469b03e..1e92405c827 100644 --- a/library/packaging/rhn_register +++ b/library/packaging/rhn_register @@ -269,7 +269,7 @@ class Rhn(RegistrationBase): # Enable requested repoid's for wanted_channel in channels: # Each inserted repo regexp will be matched. If no match, no success. - for availaible_channel in stdout.rstrip().split('\n'): # .rstrip() because of \n at the end -> empty string at the end + for available_channel in stdout.rstrip().split('\n'): # .rstrip() because of \n at the end -> empty string at the end if re.search(wanted_repo, available_channel): rc, stdout, stderr = self.module.run_command(rhn_channel_cmd + " --add --channel=%s" % available_channel, check_rc=True) From c24956032d0e5934554c57b60a7ecd4593915dc8 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 18 Mar 2014 22:39:45 -0400 Subject: [PATCH 2/2] unified calls to fs function vs duplicate functions for file and directory --- library/files/assemble | 2 +- library/files/copy | 4 ++-- library/files/ini_file | 2 +- library/files/lineinfile | 2 +- library/network/get_url | 2 +- library/network/uri | 2 +- library/web_infrastructure/htpasswd | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/library/files/assemble b/library/files/assemble index 7f0a9d1e0a1..cfb0ded6e5b 100644 --- a/library/files/assemble +++ b/library/files/assemble @@ -192,7 +192,7 @@ def main(): os.remove(path) file_args = module.load_file_common_arguments(module.params) - changed = module.set_file_attributes_if_different(file_args, changed) + changed = module.set_fs_attributes_if_different(file_args, changed) # Mission complete module.exit_json(src=src, dest=dest, md5sum=pathmd5, changed=changed, msg="OK") diff --git a/library/files/copy b/library/files/copy index 47012155f25..a62a6d22c84 100644 --- a/library/files/copy +++ b/library/files/copy @@ -123,7 +123,7 @@ def adjust_recursive_directory_permissions(pre_existing_dir, new_directory_list, if len(new_directory_list) > 0: working_dir = os.path.join(pre_existing_dir, new_directory_list.pop(0)) directory_args['path'] = working_dir - changed = module.set_directory_attributes_if_different(directory_args, changed) + changed = module.set_fs_attributes_if_different(directory_args, changed) changed = adjust_recursive_directory_permissions(working_dir, new_directory_list, module, directory_args, changed) return changed @@ -224,7 +224,7 @@ def main(): module.params['dest'] = dest file_args = module.load_file_common_arguments(module.params) - res_args['changed'] = module.set_file_attributes_if_different(file_args, res_args['changed']) + res_args['changed'] = module.set_fs_attributes_if_different(file_args, res_args['changed']) module.exit_json(**res_args) diff --git a/library/files/ini_file b/library/files/ini_file index d25d468cd17..dbb015d79d1 100644 --- a/library/files/ini_file +++ b/library/files/ini_file @@ -179,7 +179,7 @@ def main(): changed = do_ini(module, dest, section, option, value, state, backup) file_args = module.load_file_common_arguments(module.params) - changed = module.set_file_attributes_if_different(file_args, changed) + changed = module.set_fs_attributes_if_different(file_args, changed) # Mission complete module.exit_json(dest=dest, changed=changed, msg="OK") diff --git a/library/files/lineinfile b/library/files/lineinfile index ef629382f27..be6209e2b7b 100644 --- a/library/files/lineinfile +++ b/library/files/lineinfile @@ -167,7 +167,7 @@ def write_changes(module,lines,dest): def check_file_attrs(module, changed, message): file_args = module.load_file_common_arguments(module.params) - if module.set_file_attributes_if_different(file_args, False): + if module.set_fs_attributes_if_different(file_args, False): if changed: message += " and " diff --git a/library/network/get_url b/library/network/get_url index 132c8553eb2..e2384e4ebd5 100644 --- a/library/network/get_url +++ b/library/network/get_url @@ -293,7 +293,7 @@ def main(): module.params['path'] = dest file_args = module.load_file_common_arguments(module.params) file_args['path'] = dest - changed = module.set_file_attributes_if_different(file_args, changed) + changed = module.set_fs_attributes_if_different(file_args, changed) # Mission complete module.exit_json(url=url, dest=dest, src=tmpsrc, md5sum=md5sum_src, diff --git a/library/network/uri b/library/network/uri index 55fd34d0d00..8d62463df72 100644 --- a/library/network/uri +++ b/library/network/uri @@ -414,7 +414,7 @@ def main(): module.params['path'] = dest file_args = module.load_file_common_arguments(module.params) file_args['path'] = dest - changed = module.set_file_attributes_if_different(file_args, changed) + changed = module.set_fs_attributes_if_different(file_args, changed) resp['path'] = dest else: changed = False diff --git a/library/web_infrastructure/htpasswd b/library/web_infrastructure/htpasswd index d77858d10e8..4a72ea37fec 100644 --- a/library/web_infrastructure/htpasswd +++ b/library/web_infrastructure/htpasswd @@ -163,7 +163,7 @@ def absent(dest, username, check_mode): def check_file_attrs(module, changed, message): file_args = module.load_file_common_arguments(module.params) - if module.set_file_attributes_if_different(file_args, False): + if module.set_fs_attributes_if_different(file_args, False): if changed: message += " and "