I used to have this code in ansible 1.x
def playbook_on_task_start(self, name, is_conditional):
play = getattr(self, 'play', None)
task = getattr(self, 'task', None)
if play is not None and task is not None:
for host in play._play_hosts:
print host
But with ansible 2.0 looks like its all changed. My aim is to get list of hosts
when task starts for auditing purposes
Can some one please help !
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e1ce46cd-e14b-40eb-af4f-4eb3de958dd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.