Hello,

19 декември 2014, петък, 12:15:09 UTC-5, Brian Coca написа:
>
> look at the failed_when directive, it allows you to chose the failure 
> condition of a task. 
>
Thank you. failed_when did the job. My playbook now looks like

---
- name: ensure server is not running
  command: pgrep -f programname
  register: is_server_running
  failed_when: is_server_running.rc == 0
- name: backupserver
  command: serverbackup.sh

Regards
Rambius

-- 
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/9dfb3939-ae52-4934-b008-27d1dba036f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to