|
|
@ -1,9 +1,36 @@ |
|
|
|
--- |
|
|
|
# possibili nome macchina |
|
|
|
# ansible_nodename |
|
|
|
# ansible_hostname |
|
|
|
- name: Upload reverse proxy configuration |
|
|
|
- name: Create the http.conf directory for nginx |
|
|
|
file: |
|
|
|
state: directory |
|
|
|
dest: "/etc/nginx/http.conf.d" |
|
|
|
delegate_to: gandalf2 |
|
|
|
|
|
|
|
- name: Upload http to reverse proxy |
|
|
|
template: |
|
|
|
src: http.j2 |
|
|
|
dest: "/etc/nginx/http.conf.d/http_{{ hostname }}.conf" |
|
|
|
delegate_to: gandalf2 |
|
|
|
|
|
|
|
- name: Create the map.conf directory for nginx |
|
|
|
file: |
|
|
|
state: directory |
|
|
|
dest: "/etc/nginx/map.conf.d" |
|
|
|
delegate_to: gandalf2 |
|
|
|
|
|
|
|
- name: Create the upstream.conf directory for nginx |
|
|
|
file: |
|
|
|
state: directory |
|
|
|
dest: "/etc/nginx/upstream.conf.d" |
|
|
|
delegate_to: gandalf2 |
|
|
|
|
|
|
|
- name: Upload mappings to reverse proxy |
|
|
|
template: |
|
|
|
src: reverse_proxy.j2 |
|
|
|
dest: "/etc/nginx/nginx.conf.d/{{ nome_macchina }}.conf" |
|
|
|
src: map.j2 |
|
|
|
dest: "/etc/nginx/map.conf.d/map_{{ hostname }}.conf" |
|
|
|
delegate_to: gandalf2 |
|
|
|
|
|
|
|
- name: Upload upstream to reverse proxy |
|
|
|
template: |
|
|
|
src: upstream.j2 |
|
|
|
dest: "/etc/nginx/upstream.conf.d/upstream_{{ hostname }}.conf" |
|
|
|
delegate_to: gandalf2 |