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
loop: "{{ nginx_htpasswd }}"
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
htpasswd:
@ -15,4 +15,4 @@
path: "{{ nginx_htpasswd_dir }}/{{ item.0.name }}"
loop: "{{ nginx_htpasswd | subelements('users') }}"
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 }}"
register: acme_get
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
file:

View File

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