Add debug mode

pull/35/head
Emilien Mantel 2018-03-15 16:10:37 +01:00
parent def13392a7
commit 737dfbeb30
6 changed files with 18 additions and 8 deletions

View File

@ -56,6 +56,10 @@ FreeBSD:
- `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`)
- `nginx_module_packages`: package list module to install
### Misc
- `nginx_debug_role`: set _true_ if you need to see output of no\_log tasks
About modules
-------------

4
Vagrantfile vendored
View File

@ -38,7 +38,7 @@ Vagrant.configure("2") do |config|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars]
ansible.extra_vars = opts[:vars].merge({ "nginx_debug_role": true })
end
end
end
@ -54,7 +54,7 @@ Vagrant.configure("2") do |config|
ansible.playbook = "tests/test.yml"
ansible.verbose = 'vv'
ansible.become = true
ansible.extra_vars = opts[:vars]
ansible.extra_vars = opts[:vars].merge({ "nginx_debug_role": true })
end
end
end

View File

@ -130,3 +130,9 @@ nginx_acmesh_test: false
# - On Debian, if you use Owncloud from Upstream repository, you must set this var to "/var/www/owncloud"
# - TODO: force this var in vars/FreeBSD.yml
nginx_owncloud_root: '/usr/share/owncloud'
#
# Debug
#
nginx_debug_role: false

View File

@ -6,7 +6,7 @@
state: absent
with_items: "{{ nginx_htpasswd }}"
when: item.state is defined and item.state == 'absent'
no_log: true
no_log: not nginx_debug_role
- name: HTPASSWD | Manage files
htpasswd:
@ -18,4 +18,4 @@
- "{{ nginx_htpasswd }}"
- users
when: item.0.state is not defined or item.0.state == 'present'
no_log: true
no_log: not nginx_debug_role

View File

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

View File

@ -22,7 +22,7 @@
state: directory
with_items: "{{ nginx_ssl_pairs }}"
when: item.dest_key is not defined or item.dest_cert is not defined
no_log: true
no_log: not nginx_debug_role
- name: COPY | Deploy SSL keys
copy:
@ -32,7 +32,7 @@
with_items: "{{ nginx_ssl_pairs }}"
when: item.key is defined
notify: restart nginx
no_log: true
no_log: not nginx_debug_role
- name: COPY | Deploy SSL certs
copy:
@ -42,7 +42,7 @@
with_items: "{{ nginx_ssl_pairs }}"
when: item.cert is defined
notify: restart nginx
no_log: true
no_log: not nginx_debug_role
- name: Check DH command status
async_status: