[ansible-devel] How to skip and move on to the next task if a condition is met?

2020-07-03 Thread Amir Alavi
Hi all, Newbie here - I'm writing a playbook that I'm running a shell script and if the output is X then I want to skip the task and move on to the next task. How do I do this? Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To

Re: [ansible-devel] How to skip and move on to the next task if a condition is met?

2020-07-03 Thread Magnus Lubeck
You use "register: myVariable" on the shell task, then "when: myVariable.stdout == XY" on the next task. https://www.mydailytutorials.com/ansible-register-variables/ //magnus On Fri, Jul 3, 2020 at 1:51 PM Amir Alavi wrote: > Hi all, > > Newbie here - I'm writing a playbook that I'm running a