nginx load balancing internal/external working
This commit is contained in:
@@ -58,13 +58,15 @@
|
||||
- name: Template all http configurations
|
||||
template:
|
||||
src: https.conf
|
||||
dest: /etc/nginx/http.d/{{ item.1 }}.conf
|
||||
dest: /etc/nginx/http.d/{{ item.1 }}.{{ item.0.internal.port }}.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
# item.0 == full dictionary
|
||||
# item.1 == external domain
|
||||
loop: "{{ http | subelements('external.domains') }}"
|
||||
- name: Test nginx configuration
|
||||
ansible.builtin.shell: /usr/sbin/nginx -t
|
||||
- name: Reload nginx service
|
||||
ansible.builtin.systemd_service:
|
||||
state: restarted
|
||||
|
||||
Reference in New Issue
Block a user