Can you share what a failure means in the above, any output you have, and what ansible version you are running?
Thanks! On Wed, Aug 6, 2014 at 10:02 AM, Manuel Quiñones <[email protected]> wrote: > Hi, > > I'm trying to do a conditional register in a playbook: > > tasks: > - shell: echo /opt/cache/www/ > register: www_data > when: ansible_hostname | match("^xy-") > > - shell: echo /mnt/code/www/ > register: www_data > when: ansible_hostname | match("^az-") > > - debug: var=www_data.stdout > when: www_data.rc is defined and www_data.rc == 0 > > Only the last register "/mnt/code/www/" is shown by debug, and for the > other I'm getting failures. > I would like to know what is the proper way to do this. > > Thanks, > > -- > 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/258d8420-6865-474d-a847-f0da5ae4512d%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/258d8420-6865-474d-a847-f0da5ae4512d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgxsvaQ1-ZDO%2Bi7-QbYXMbb4MKvZvtAzs1i4cMAhzNUcLQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
