parent
5e2f988beb
commit
297dc1f669
|
@ -1,2 +1,4 @@
|
||||||
|
---
|
||||||
|
|
||||||
enable_list:
|
enable_list:
|
||||||
- fqcn-builtins
|
- fqcn-builtins
|
||||||
|
|
|
@ -56,9 +56,12 @@
|
||||||
label: "{{ item | nginx_site_name }}"
|
label: "{{ item | nginx_site_name }}"
|
||||||
|
|
||||||
- name: TEMPLATE | Create sites with preconfigured template
|
- name: TEMPLATE | Create sites with preconfigured template
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: "{{ item.custom_template }}"
|
src: "{{ item.custom_template }}"
|
||||||
dest: "{{ nginx_etc_dir }}/sites-available/{{ item | nginx_site_filename }}"
|
dest: "{{ nginx_etc_dir }}/sites-available/{{ item | nginx_site_filename }}"
|
||||||
|
mode: 0644
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
notify: ['reload nginx', 'restart nginx freebsd']
|
notify: ['reload nginx', 'restart nginx freebsd']
|
||||||
when: (item.state is not defined or item.state != 'absent') and item.custom_template is defined
|
when: (item.state is not defined or item.state != 'absent') and item.custom_template is defined
|
||||||
loop: "{{ nginx_sites }}"
|
loop: "{{ nginx_sites }}"
|
||||||
|
|
|
@ -320,9 +320,10 @@
|
||||||
- 'test-php-index2.local'
|
- 'test-php-index2.local'
|
||||||
|
|
||||||
- name: -- Add Directories --
|
- name: -- Add Directories --
|
||||||
file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
mode: 0755
|
||||||
loop:
|
loop:
|
||||||
- "{{ nginx_root }}/test-htpasswd.local/public/hello"
|
- "{{ nginx_root }}/test-htpasswd.local/public/hello"
|
||||||
- "/tmp/custom-template"
|
- "/tmp/custom-template"
|
||||||
|
|
Loading…
Reference in New Issue