Fix no_log call crashes on Ansible 2.11

debian_11
Emilien Mantel 2021-09-01 11:02:45 +02:00
parent 8b73a835c6
commit 8268eb266a
3 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,7 @@
state: absent state: absent
loop: "{{ nginx_htpasswd }}" loop: "{{ nginx_htpasswd }}"
when: item.state is defined and item.state == 'absent' when: item.state is defined and item.state == 'absent'
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"
- name: HTPASSWD | Manage files - name: HTPASSWD | Manage files
htpasswd: htpasswd:
@ -15,4 +15,4 @@
path: "{{ nginx_htpasswd_dir }}/{{ item.0.name }}" path: "{{ nginx_htpasswd_dir }}/{{ item.0.name }}"
loop: "{{ nginx_htpasswd | subelements('users') }}" loop: "{{ nginx_htpasswd | subelements('users') }}"
when: item.0.state is not defined or item.0.state == 'present' when: item.0.state is not defined or item.0.state == 'present'
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"

View File

@ -58,7 +58,7 @@
loop: "{{ acme_create }}" loop: "{{ acme_create }}"
register: acme_get register: acme_get
failed_when: acme_get.rc != 0 and acme_get.rc != 2 failed_when: acme_get.rc != 0 and acme_get.rc != 2
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"
- name: FILE | Create SSL dir per site - name: FILE | Create SSL dir per site
file: file:

View File

@ -34,7 +34,7 @@
state: directory state: directory
loop: "{{ nginx_ssl_pairs }}" loop: "{{ nginx_ssl_pairs }}"
when: item.dest_key is not defined or item.dest_cert is not defined when: item.dest_key is not defined or item.dest_cert is not defined
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"
- name: COPY | Deploy SSL keys - name: COPY | Deploy SSL keys
copy: copy:
@ -44,7 +44,7 @@
loop: "{{ nginx_ssl_pairs }}" loop: "{{ nginx_ssl_pairs }}"
when: item.key is defined when: item.key is defined
notify: restart nginx notify: restart nginx
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"
- name: COPY | Deploy SSL certs - name: COPY | Deploy SSL certs
copy: copy:
@ -54,7 +54,9 @@
loop: "{{ nginx_ssl_pairs }}" loop: "{{ nginx_ssl_pairs }}"
when: item.cert is defined when: item.cert is defined
notify: restart nginx notify: restart nginx
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"
- name: COMMAND | Create self-signed certificates - name: COMMAND | Create self-signed certificates
command: | command: |
@ -69,4 +71,4 @@
loop: "{{ nginx_ssl_pairs }}" loop: "{{ nginx_ssl_pairs }}"
when: item.self_signed is defined when: item.self_signed is defined
notify: restart nginx notify: restart nginx
no_log: not nginx_debug_role no_log: "{{ not nginx_debug_role }}"