mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix compile errors in scripts.
This commit is contained in:
parent
47083f145a
commit
75c281debc
6 changed files with 9 additions and 13 deletions
|
@ -69,7 +69,7 @@ parser.add_option('--host', default=None, dest="host",
|
||||||
|
|
||||||
# get all the ssh configs for all boxes in an array of dictionaries.
|
# get all the ssh configs for all boxes in an array of dictionaries.
|
||||||
def get_ssh_config():
|
def get_ssh_config():
|
||||||
return {k: get_a_ssh_config(k) for k in list_running_boxes()}
|
return dict((k, get_a_ssh_config(k)) for k in list_running_boxes())
|
||||||
|
|
||||||
|
|
||||||
# list all the running boxes
|
# list all the running boxes
|
||||||
|
@ -102,7 +102,7 @@ def get_a_ssh_config(box_name):
|
||||||
if os.path.isfile(id):
|
if os.path.isfile(id):
|
||||||
host_config['identityfile'] = id
|
host_config['identityfile'] = id
|
||||||
|
|
||||||
return {v: host_config[k] for k, v in _ssh_to_ansible}
|
return dict((v, host_config[k]) for k, v in _ssh_to_ansible)
|
||||||
|
|
||||||
# List out servers that vagrant has running
|
# List out servers that vagrant has running
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|
|
@ -72,17 +72,17 @@ def main():
|
||||||
if tqm is not None:
|
if tqm is not None:
|
||||||
tqm.cleanup()
|
tqm.cleanup()
|
||||||
|
|
||||||
print "UP ***********"
|
print("UP ***********")
|
||||||
for host, result in callback.host_ok.items():
|
for host, result in callback.host_ok.items():
|
||||||
print '{} >>> {}'.format(host, result._result['stdout'])
|
print('{} >>> {}'.format(host, result._result['stdout']))
|
||||||
|
|
||||||
print "FAILED *******"
|
print("FAILED *******")
|
||||||
for host, result in callback.host_failed.items():
|
for host, result in callback.host_failed.items():
|
||||||
print '{} >>> {}'.format(host, result._result['msg'])
|
print('{} >>> {}'.format(host, result._result['msg']))
|
||||||
|
|
||||||
print "DOWN *********"
|
print("DOWN *********")
|
||||||
for host, result in callback.host_unreachable.items():
|
for host, result in callback.host_unreachable.items():
|
||||||
print '{} >>> {}'.format(host, result._result['msg'])
|
print('{} >>> {}'.format(host, result._result['msg']))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -29,7 +29,7 @@ for aclass in class_list:
|
||||||
|
|
||||||
# build ordered list to loop over and dict with attributes
|
# build ordered list to loop over and dict with attributes
|
||||||
clist.append(name)
|
clist.append(name)
|
||||||
oblist[name] = {x: aobj.__dict__['_attributes'][x] for x in aobj.__dict__['_attributes'] if 'private' not in x or not x.private}
|
oblist[name] = dict((x, aobj.__dict__['_attributes'][x]) for x in aobj.__dict__['_attributes'] if 'private' not in x or not x.private)
|
||||||
|
|
||||||
# loop is really with_ for users
|
# loop is really with_ for users
|
||||||
if name == 'Task':
|
if name == 'Task':
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
/lib/ansible/modules/remote_management/ipmi/
|
/lib/ansible/modules/remote_management/ipmi/
|
||||||
/lib/ansible/modules/univention/
|
/lib/ansible/modules/univention/
|
||||||
/lib/ansible/modules/web_infrastructure/letsencrypt.py
|
/lib/ansible/modules/web_infrastructure/letsencrypt.py
|
||||||
/lib/ansible/modules/__init__.py
|
|
||||||
/lib/ansible/module_utils/a10.py
|
/lib/ansible/module_utils/a10.py
|
||||||
/lib/ansible/module_utils/azure_rm_common.py
|
/lib/ansible/module_utils/azure_rm_common.py
|
||||||
/lib/ansible/module_utils/cloud.py
|
/lib/ansible/module_utils/cloud.py
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
/contrib/inventory/vagrant.py
|
|
||||||
/hacking/dump_playbook_attributes.py
|
|
|
@ -1 +0,0 @@
|
||||||
/examples/scripts/uptime.py
|
|
Loading…
Reference in a new issue