1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

avoid private attributes

hardcode adding with_ for tasks
This commit is contained in:
Brian Coca 2016-03-10 01:00:33 -05:00
parent 923548f6d5
commit 6a85da7e0c

View file

@ -29,13 +29,11 @@ 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] = aobj.__dict__['_attributes'] oblist[name] = {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 'loop' in oblist[name]: if name == 'Task':
oblist[name]['with_<lookup_plugin>'] = True oblist[name]['with_<lookup_plugin>'] = True
del oblist[name]['loop']
del oblist[name]['loop_args']
# local_action is implicit with action # local_action is implicit with action
if 'action' in oblist[name]: if 'action' in oblist[name]: