- 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