diff --git a/lib/ansible/runner/connection_plugins/paramiko_ssh.py b/lib/ansible/runner/connection_plugins/paramiko_ssh.py index 84a57c194d..6c57e2a9d0 100644 --- a/lib/ansible/runner/connection_plugins/paramiko_ssh.py +++ b/lib/ansible/runner/connection_plugins/paramiko_ssh.py @@ -284,15 +284,15 @@ class Connection(object): f = open(filename, 'w') for hostname, keys in self.ssh._host_keys.iteritems(): for keytype, key in keys.iteritems(): - # was f.write - added_this_time = getattr(key, '_added_by_ansible_this_time', False) - if not added_this_time: - f.write("%s %s %s\n" % (hostname, keytype, key.get_base64())) + # was f.write + added_this_time = getattr(key, '_added_by_ansible_this_time', False) + if not added_this_time: + f.write("%s %s %s\n" % (hostname, keytype, key.get_base64())) for hostname, keys in self.ssh._host_keys.iteritems(): for keytype, key in keys.iteritems(): - added_this_time = getattr(key, '_added_by_ansible_this_time', False) - if added_this_time: - f.write("%s %s %s\n" % (hostname, keytype, key.get_base64())) + added_this_time = getattr(key, '_added_by_ansible_this_time', False) + if added_this_time: + f.write("%s %s %s\n" % (hostname, keytype, key.get_base64())) f.close() def close(self): diff --git a/library/packaging/apt b/library/packaging/apt index fa1093b2ac..bf698cb403 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -292,7 +292,7 @@ def main(): APT_GET_CMD = module.get_bin_path("apt-get") if not APTITUDE_CMD: - module.fail_json(msg="Could not find aptitude. Please ensure it is installed.") + module.fail_json(msg="Could not find aptitude. Please ensure it is installed.") p = module.params install_recommends = p['install_recommends'] diff --git a/library/web_infrastructure/supervisorctl b/library/web_infrastructure/supervisorctl index 429e234c46..4ea2bc39fa 100644 --- a/library/web_infrastructure/supervisorctl +++ b/library/web_infrastructure/supervisorctl @@ -98,10 +98,15 @@ def main(): password = module.params.get('password') supervisorctl_args = [ module.get_bin_path('supervisorctl', True) ] - if config: supervisorctl_args.extend(['-c', config]) - if server_url: supervisorctl_args.extend(['-s', server_url]) - if username: supervisorctl_args.extend(['-u', username]) - if password: supervisorctl_args.extend(['-p', password]) + + if config: + supervisorctl_args.extend(['-c', config]) + if server_url: + supervisorctl_args.extend(['-s', server_url]) + if username: + supervisorctl_args.extend(['-u', username]) + if password: + supervisorctl_args.extend(['-p', password]) def run_supervisorctl(cmd, name=None, **kwargs): args = list(supervisorctl_args) # copy the master args