Commit 256ca3be authored by Chris Croome's avatar Chris Croome

test

parent e2dafbec
Pipeline #8638 passed with stage
in 21 seconds
......@@ -2,65 +2,70 @@
- name: Set munin_phpfpm_users for servers with chrooted php-fpm users
block:
- name: Debug user.value.users_state variable is not defined or equal to present
debug:
msg: "user.value.users_state for {{ user.key }} is present or not defined"
verbosity: 1
when: ( user.value.users_state is not defined ) or ( user.value.users_state == "present" )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user.key
label: "{{ user.key }}"
tags:
- munin
- name: When users is not empty
block:
- name: Debug user.value.users_state variable when defined or equal to absent
debug:
msg: "user.value.users_state for {{ user.key }} is defined and set to absent"
verbosity: 1
when: ( user.value.users_state is defined ) and ( user.value.users_state == "absent" )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
- name: Debug user.value.users_state variable is not defined or equal to present
debug:
msg: "user.value.users_state for {{ user.key }} is present or not defined"
verbosity: 1
when: ( user.value.users_state is not defined ) or ( user.value.users_state == "present" )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user.key
label: "{{ user.key }}"
tags:
- munin
- name: Debug user.value.users_groups
debug:
msg: "user.value.users_groups: {{ user.value.users_groups }}"
verbosity: 1
when: ( user.value.users_groups is defined ) and ( user.value.users_groups != [] )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
- name: Debug user.value.users_state variable when defined or equal to absent
debug:
msg: "user.value.users_state for {{ user.key }} is defined and set to absent"
verbosity: 1
when: ( user.value.users_state is defined ) and ( user.value.users_state == "absent" )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
- name: Set a fact for the users who are present and in the phpfpm and chroot groups
set_fact:
munin_phpfpm_users: "{{ munin_phpfpm_users | default('') }} {{ user.key }}"
when:
- ( user.value.users_state is not defined ) or ( user.value.users_state == "present" )
- ( user.value.users_groups is defined ) and ( user.value.users_groups != [] )
- ( "phpfpm" in user.value.users_groups ) and ( "chroot" in user.value.users_groups )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
- name: Debug user.value.users_groups
debug:
msg: "user.value.users_groups: {{ user.value.users_groups }}"
verbosity: 1
when: ( user.value.users_groups is defined ) and ( user.value.users_groups != [] )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
- name: Debug the list of munin_phpfpm_users
debug:
msg: "munin_phpfpm_users: {{ munin_phpfpm_users }}"
verbosity: 1
when: ( munin_phpfpm_users is defined ) and ( munin_phpfpm_users != "" )
tags:
- munin
- name: Set a fact for the users who are present and in the phpfpm and chroot groups
set_fact:
munin_phpfpm_users: "{{ munin_phpfpm_users | default('') }} {{ user.key }}"
when:
- ( user.value.users_state is not defined ) or ( user.value.users_state == "present" )
- ( user.value.users_groups is defined ) and ( user.value.users_groups != [] )
- ( "phpfpm" in user.value.users_groups ) and ( "chroot" in user.value.users_groups )
loop: "{{ users | dict2items }}"
loop_control:
loop_var: user
label: "{{ user.key }}"
tags:
- munin
when: ( users is defined ) and ( users != "" ) and ( users != [] )
- name: Debug the list of munin_phpfpm_users
debug:
msg: "munin_phpfpm_users: {{ munin_phpfpm_users }}"
verbosity: 1
when: ( munin_phpfpm_users is defined ) and ( munin_phpfpm_users != "" )
tags:
- munin
when: ( users != "" ) and ( users != [] )
when: ( users is defined )
- name: Determine the PHP-FPM version
include_tasks: phpfpm_version.yml
......
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