mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
tweak indentation for 'make pep8'
This commit is contained in:
parent
588b20c012
commit
e1167d6977
3 changed files with 17 additions and 12 deletions
|
@ -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):
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue