Hallelujah! You did it. Big thanks to you sir!

TASK [command] 
*****************************************************************

Saturday 17 December 2016  14:08:12 +0100 (0:00:00.101)       0:00:01.122 
*****

skipping: [localMulti1]

skipping: [localMulti3]

changed: [localMulti2]


PLAY RECAP 
*********************************************************************

localMulti1                : ok=3    changed=0    unreachable=0    failed=0

localMulti2                : ok=3    changed=1    unreachable=0    failed=0

localMulti3                : ok=2    changed=0    unreachable=0    failed=0



On Friday, December 16, 2016 at 11:29:39 PM UTC+1, Kai Stian Olstad wrote:
>
> On 16. des. 2016 19:12, Kevin Csuka wrote: 
> > Here is a playbook to test it locally. 
> > --- 
> > - hosts: my-3-nodes 
> >   tasks: 
> >     - stat: 
> >         path: /tmp/hi 
> >       register: me 
> > 
> >     - shell: echo 
> >       when: me.stat.exists == true and ... 
> > 
> > 
> > On node 2 and 3 perform: 
> > $: touch /tmp/hi 
> > 
>
>    tasks: 
>      - stat: 
>          path: /tmp/hi 
>        register: me 
>
>      - set_fact: 
>          run_on: "{{ item }}" 
>        with_items: "{{ play_hosts }}" 
>        when: run_on is undefined and hostvars[item].me.stat.exists 
>        run_once: true 
>
>      - shell: echo 
>        when: inventory_hostname == run_on 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/52f3a023-f725-4bf6-bbdb-13fc8be82aa1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to