create molecule scenario for monitoring role
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
# defaults file for roles/nginx
|
||||
nginx_user: www-data
|
||||
nginx_htpasswd_user: admin
|
||||
nginx_owner: www-data
|
||||
nginx_group: "{{ nginx_owner }}"
|
||||
nginx_template_file: nginx.conf.j2
|
||||
nginx_config_dir: /etc/nginx/conf.d
|
||||
@@ -5,15 +5,14 @@
|
||||
password: "{{ location.basic_auth.password }}"
|
||||
state: present
|
||||
create: yes
|
||||
owner: "{{ nginx_user }}"
|
||||
group: "{{ nginx_user }}"
|
||||
owner: "{{ nginx_owner }}"
|
||||
group: "{{ nginx_group }}"
|
||||
mode: 0600
|
||||
loop: "{{ nginx_server.locations }}"
|
||||
loop_control:
|
||||
loop_var: location
|
||||
label: "{{ location.path }}"
|
||||
when: "location.basic_auth is defined"
|
||||
|
||||
notify:
|
||||
- reload nginx
|
||||
|
||||
@@ -21,8 +20,8 @@
|
||||
template:
|
||||
src: "{{ nginx_template_file }}"
|
||||
dest: "{{ nginx_config_dir }}/{{ nginx_config_file }}"
|
||||
owner: "{{ nginx_user }}"
|
||||
group: "{{ nginx_user }}"
|
||||
owner: "{{ nginx_owner }}"
|
||||
group: "{{ nginx_group }}"
|
||||
mode: 0644
|
||||
notify:
|
||||
- reload nginx
|
||||
|
||||
Reference in New Issue
Block a user