is there a way for a task to know if playbook is running in check-mode?

28 views
Skip to first unread message

Eric Chaves

unread,
Nov 28, 2013, 10:10:43 PM11/28/13
to ansible...@googlegroups.com
Hi people,

Some modules when running in check-mode still raising errors in certain conditions. For example, the service module fails when the service is not found, which is usually installed in a previous task on the playbook, which is kind of annoying. On the other hand, I understand that ansible should not ignore errors in check mode as rule, but I was wondering if I could set some specific tasks in the playbook to ignore errors when running in check-mode.

Is something like this possible?

Best regards,

Eric

Michael DeHaan

unread,
Nov 29, 2013, 11:15:51 AM11/29/13
to ansible...@googlegroups.com
There's currently no magic variable set when a playbook is in check mode that "failed_when" could key off of.

I'm open to it.




--
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 ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michael DeHaan <mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

Reply all
Reply to author
Forward
0 new messages