1
0
Fork 0
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:
Matt Clay 2016-12-06 18:00:35 -05:00
parent 47083f145a
commit 75c281debc
6 changed files with 9 additions and 13 deletions

View file

@ -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.
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
@ -102,7 +102,7 @@ def get_a_ssh_config(box_name):
if os.path.isfile(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
# ------------------------------

View file

@ -72,17 +72,17 @@ def main():
if tqm is not None:
tqm.cleanup()
print "UP ***********"
print("UP ***********")
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():
print '{} >>> {}'.format(host, result._result['msg'])
print('{} >>> {}'.format(host, result._result['msg']))
print "DOWN *********"
print("DOWN *********")
for host, result in callback.host_unreachable.items():
print '{} >>> {}'.format(host, result._result['msg'])
print('{} >>> {}'.format(host, result._result['msg']))
if __name__ == '__main__':
main()

View file

@ -29,7 +29,7 @@ for aclass in class_list:
# build ordered list to loop over and dict with attributes
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
if name == 'Task':

View file

@ -26,7 +26,6 @@
/lib/ansible/modules/remote_management/ipmi/
/lib/ansible/modules/univention/
/lib/ansible/modules/web_infrastructure/letsencrypt.py
/lib/ansible/modules/__init__.py
/lib/ansible/module_utils/a10.py
/lib/ansible/module_utils/azure_rm_common.py
/lib/ansible/module_utils/cloud.py

View file

@ -1,2 +0,0 @@
/contrib/inventory/vagrant.py
/hacking/dump_playbook_attributes.py

View file

@ -1 +0,0 @@
/examples/scripts/uptime.py