Skip to content
Snippets Groups Projects
Commit 8254ec0a authored by Chris Croome's avatar Chris Croome
Browse files

apache2ctl outputs to stderr not stdout

parent 2ba2287b
No related branches found
No related tags found
No related merge requests found
......@@ -61,18 +61,18 @@
register: apache2ctl_configtest
- debug:
msg: "{{ apache2ctl_configtest.stdout }}"
msg: "{{ apache2ctl_configtest.stderr }}"
verbosity: 1
- name: Apache restarted
service:
name: apache2
state: restarted
when: '"Syntax OK" in apache2ctl_configtest.stdout'
when: '"Syntax OK" in apache2ctl_configtest.stderr'
- name: Fail if Apache configtest is not OK
fail:
msg: "{{ apache2ctl_configtest.stdout }}"
when: '"Syntax OK" not in apache2ctl_configtest.stdout'
when: '"Syntax OK" not in apache2ctl_configtest.stderr'
when: apache_packages.changed or apache_conf.changed or apache_modules.changed or apache_ssl.changed or apache_localhost.changed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment