- name: Httpd running ? shell: ps axo args | grep httpd | grep -v grep register: apache failed_when: false ignore_errors: yes <*---- if this removed I get red error on non httpd servers*
- name: Copy script get_url: url: "http://anotherscript.sh dest: /tmp/anotherscript.sh mode: 0755 owner: root group: root force: yes when: apache.rc == 0 What I want is some thing along those lines when apache.rc == 0 do url; dest; mode; owner etc done when apache.rc != 0 next If I put " ignore_errors: yes " then it ignore apache.rc and do every thing(url, dest, mod etc) on a given server regardless it has httpd running or not. If I remove " ignore_errors: yes " then it starts bringing red font errors on all the servers where httpd is not running. Thank you -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ed8bcc86-43b4-4b4f-bfd9-a41155c65021%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.