On 26 February 2015 at 17:21, shirou <[email protected]> wrote:

Hi,
>
> This E-mail is a little bit old but I am in the same situation.
>
>      ignore_errors: test_err | bool
>
> doesn't work for me on ansible 1.8.4
>
> Is there any work around?
>
> The last time I needed to have conditional ignore_errors, because that
option did not accept a variable I had to duplicate the task in question.
One version of the task had ignore_errors: yes and had a conditional when:
my_var | bool and the other had no such setting and the conditional when:
not my_var | bool.

Something like this:

vars:
  myvar: yes
tasks:
  - some_module: name=blah state=present
    ignore_errors: yes
    when: myvar | bool
  - some_module: name=blah state=present
    when: not myvar | bool

Hope this helps

Tom
​

-- 
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/CAAnNz0PPgwdbp_83VhEiddj1YeBOG4DOCOD8uVtHTYE2X05BKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to