Commit cad465ed authored by Chris Croome's avatar Chris Croome

check mode

parent ba09df16
Pipeline #8266 passed with stage
in 23 seconds
......@@ -3,6 +3,7 @@
shell: "dpkg -s php{% if munin_debian_version == 'stretch' or munin_debian_version == 'xenian' %}7.0{% elif munin_debian_version == 'bionic' %}7.2{% elif munin_debian_version == 'buster' %}7.3{% endif %}-fpm | grep ^Status | awk '{ print $4 }'"
register: munin_phpfpm_status
changed_when: false
check_mode: false
tags:
- munin
......@@ -10,13 +11,15 @@
debug:
msg: "munin_phpfpm_status: {{ munin_phpfpm_status.stdout }}"
verbosity: 1
when: ( munin_phpfpm_status is defined ) and ( ansible_check_mode == False )
check_mode: false
when: munin_phpfpm_status is defined
tags:
- munin
- name: Set a fact for the PHP-FPM version
set_fact:
munin_phpfpm_version: "{% if munin_debian_version == 'stretch' %}7.0{% elif munin_debian_version == 'buster' %}7.3{% elif munin_debian_version == 'bionic' %}7.2{% endif %}"
check_mode: false
when: ( munin_phpfpm_status.stdout == "installed" ) and ( munin_phpfpm_version is not defined or munin_phpfpm_version == "" )
tags:
- munin
......@@ -25,6 +28,7 @@
debug:
msg: "munin_phpfpm_version: {{ munin_phpfpm_version }}"
verbosity: 1
check_mode: false
when: munin_phpfpm_version is defined
tags:
- munin
......@@ -32,6 +36,7 @@
- name: Set a fact for the PHP-FPM socket path
set_fact:
munin_phpfpm_socket: "/var/run/php/php{{ munin_phpfpm_version }}-fpm.sock"
check_mode: false
when: ( munin_phpfpm_status.stdout == "installed" ) and ( munin_phpfpm_socket is not defined or munin_phpfpm_socket == "" )
tags:
- munin
......@@ -40,7 +45,8 @@
debug:
msg: "PHP-FPM socket: {{ munin_phpfpm_socket }}"
verbosity: 1
when: ( munin_phpfpm_socket is defined ) and ( ansible_check_mode == False )
check_mode: false
when: munin_phpfpm_socket is defined
tags:
- munin
...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment