syntax cleanup.
This commit is contained in:
parent
71e3a948c6
commit
119a8578ec
|
@ -1,7 +1,10 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Create the nginx webroot if different from the default
|
- name: Create the nginx webroot if different from the default
|
||||||
file: dest={{ nginx_webroot }} state=directory mode=0755
|
file:
|
||||||
|
dest: '{{ nginx_webroot }}'
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
when: nginx_webroot != '/usr/share/nginx/html'
|
when: nginx_webroot != '/usr/share/nginx/html'
|
||||||
|
|
||||||
tags: [ 'nginx', 'virtualhost' ]
|
tags: [ 'nginx', 'virtualhost' ]
|
||||||
|
@ -9,13 +12,21 @@
|
||||||
- name: Install and enable the nginx virtualhost files on Deb based systems
|
- name: Install and enable the nginx virtualhost files on Deb based systems
|
||||||
block:
|
block:
|
||||||
- name: Install the nginx virtualhost files
|
- name: Install the nginx virtualhost files
|
||||||
template: src=nginx-virthost.j2 dest=/etc/nginx/sites-available/{{ item.virthost_name }} owner=root group=root mode=0444
|
template:
|
||||||
loop: '{{ nginx_virthosts | default(omit) }}'
|
src: nginx-virthost.j2
|
||||||
|
dest: '/etc/nginx/sites-available/{{ item.virthost_name }}'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0444
|
||||||
|
loop: '{{ nginx_virthosts }}'
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
|
|
||||||
- name: Enable the nginx virtualhosts
|
- name: Enable the nginx virtualhosts
|
||||||
file: src=/etc/nginx/sites-available/{{ item.virthost_name }} dest=/etc/nginx/sites-enabled/{{ item.virthost_name }} state=link
|
file:
|
||||||
loop: '{{ nginx_virthosts | default(omit) }}'
|
src: '/etc/nginx/sites-available/{{ item.virthost_name }}'
|
||||||
|
dest: '/etc/nginx/sites-enabled/{{ item.virthost_name }}'
|
||||||
|
state: link
|
||||||
|
loop: '{{ nginx_virthosts }}'
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
|
|
||||||
when: ansible_distribution_file_variety == "Debian"
|
when: ansible_distribution_file_variety == "Debian"
|
||||||
|
@ -24,8 +35,13 @@
|
||||||
- name: Install and enable the nginx virtualhost files on RH based systems
|
- name: Install and enable the nginx virtualhost files on RH based systems
|
||||||
block:
|
block:
|
||||||
- name: Install the nginx virtualhost files
|
- name: Install the nginx virtualhost files
|
||||||
template: src=nginx-virthost.j2 dest=/etc/nginx/conf.d/{{ item.virthost_name }}.conf owner=root group=root mode=0444
|
template:
|
||||||
loop: '{{ nginx_virthosts | default(omit) }}'
|
src: nginx-virthost.j2
|
||||||
|
dest: '/etc/nginx/conf.d/{{ item.virthost_name }}.conf'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0444
|
||||||
|
loop: '{{ nginx_virthosts }}'
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
|
|
||||||
- name: nginx must be able to network connect when used as a proxy
|
- name: nginx must be able to network connect when used as a proxy
|
||||||
|
@ -33,7 +49,7 @@
|
||||||
name: httpd_can_network_connect
|
name: httpd_can_network_connect
|
||||||
state: yes
|
state: yes
|
||||||
persistent: yes
|
persistent: yes
|
||||||
loops: '{{ nginx_virthosts | default(omit) }}'
|
loop: '{{ nginx_virthosts }}'
|
||||||
when: item.proxy_standard_setup is defined and item.proxy_standard_setup
|
when: item.proxy_standard_setup is defined and item.proxy_standard_setup
|
||||||
|
|
||||||
when: ansible_distribution_file_variety == "RedHat"
|
when: ansible_distribution_file_variety == "RedHat"
|
||||||
|
|
Loading…
Reference in New Issue