Will the host be the same on each run? If so you could put a guard round the task when ansible_inventory_hostname is equal to the desired host.
when: ansible_inventory_hostname == "desired-host-name" Something like the above? Or maybe you could look into using delegated tasks http://docs.ansible.com/ansible/playbooks_delegation.html#delegation Kind Regards On Thursday, 15 December 2016 08:01:14 UTC, Kevin Csuka wrote: > > Sorry if my message was unclear. The goal is to perform 'othertask' on > only ONE host, where the value is false. > Your script will execute 'othertask' on ALL the hosts where the value is > false, in this case, TWO hosts. > > Also, run_once will not work because it will only run on the first host, > where the boolean is true. > -- 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/815f7866-44df-4bbb-a623-7c0440f3b69f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
