1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 ---
- name: "[nginx] Place password-file: /etc/nginx/passwd/rest-server"
copy:
content: "{{ services.rest_server.nginx.password }}"
dest: /etc/nginx/passwd/rest-server
owner: "{{ services.nginx.user | default('http') }}"
group: "{{ services.nginx.group | default('http') }}"
mode: 0700
when:
- services.rest_server.nginx.password is defined
notify: "Restart nginx"
- name: "[nginx] Create vhost"
template:
src: nginx-vhost.conf.j2
dest: /etc/nginx/conf.d/rest-server.conf
mode: 0644
owner: "{{ services.nginx.user | default('http') }}"
group: "{{ services.nginx.group | default('http') }}"
notify: "Restart nginx"