|
3 | 3 | ansible.builtin.file:
|
4 | 4 | path: "{{ item['deployment_location'] | default('/usr/share/nginx/html') | dirname }}"
|
5 | 5 | state: directory
|
6 |
| - mode: 0755 |
| 6 | + mode: "0755" |
7 | 7 | loop: "{{ nginx_config_html_demo_template }}"
|
8 | 8 | when: nginx_config_html_demo_template_enable | bool
|
9 | 9 |
|
|
12 | 12 | src: "{{ item['template_file'] | default('www/index.html.j2') }}"
|
13 | 13 | dest: "{{ item['deployment_location'] | default('/usr/share/nginx/html/index.html') }}"
|
14 | 14 | backup: "{{ item['backup'] | default(true) }}"
|
15 |
| - mode: 0644 |
| 15 | + mode: "0644" |
16 | 16 | loop: "{{ nginx_config_html_demo_template }}"
|
17 | 17 | when: nginx_config_html_demo_template_enable | bool
|
18 | 18 |
|
|
31 | 31 | ansible.builtin.file:
|
32 | 32 | path: "{{ nginx_config_main_template['deployment_location'] | default('/etc/nginx') | dirname }}"
|
33 | 33 | state: directory
|
34 |
| - mode: 0755 |
| 34 | + mode: "0755" |
35 | 35 | when: nginx_config_main_template_enable | bool
|
36 | 36 |
|
37 | 37 | - name: Dynamically generate NGINX main configuration file
|
38 | 38 | ansible.builtin.template:
|
39 | 39 | src: "{{ nginx_config_main_template['template_file'] | default('nginx.conf.j2') }}"
|
40 | 40 | dest: "{{ nginx_config_main_template['deployment_location'] | default('/etc/nginx/nginx.conf') }}"
|
41 | 41 | backup: "{{ nginx_config_main_template['backup'] | default(true) }}"
|
42 |
| - mode: 0644 |
| 42 | + mode: "0644" |
43 | 43 | when: nginx_config_main_template_enable | bool
|
44 | 44 | notify: (Handler - NGINX Config) Run NGINX
|
45 | 45 |
|
|
48 | 48 | path: "{{ item['config']['core']['client_body_temp_path']['path'] }}"
|
49 | 49 | state: directory
|
50 | 50 | owner: "{{ nginx_config_main_template['config']['main']['user']['username'] | default('nginx') }}"
|
51 |
| - mode: 0755 |
| 51 | + mode: "0755" |
52 | 52 | loop: "{{ nginx_config_http_template }}"
|
53 | 53 | loop_control:
|
54 | 54 | label: "{{ item['config']['core']['client_body_temp_path']['path'] | default('config[''core''][''client_body_temp_path''][''path''] undefined') }}" # noqa jinja[spacing]
|
|
61 | 61 | path: "{{ item[1]['path'] }}"
|
62 | 62 | state: directory
|
63 | 63 | owner: "{{ nginx_config_main_template['config']['main']['user']['username'] | default('nginx') }}"
|
64 |
| - mode: 0755 |
| 64 | + mode: "0755" |
65 | 65 | loop: "{{ nginx_config_http_template | subelements(['config', 'proxy', 'cache_path'], skip_missing=True) }}"
|
66 | 66 | loop_control:
|
67 | 67 | label: "{{ item[1]['path'] | default('config[''proxy''][''cache_path''][''path''] undefined') }}" # noqa jinja[spacing]
|
|
71 | 71 | ansible.builtin.file:
|
72 | 72 | path: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/') | dirname }}"
|
73 | 73 | state: directory
|
74 |
| - mode: 0755 |
| 74 | + mode: "0755" |
75 | 75 | loop: "{{ nginx_config_http_template }}"
|
76 | 76 | loop_control:
|
77 | 77 | label: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/') | dirname }}"
|
|
82 | 82 | src: "{{ item['template_file'] | default('http/default.conf.j2') }}"
|
83 | 83 | dest: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/default.conf') }}"
|
84 | 84 | backup: "{{ item['backup'] | default(true) }}"
|
85 |
| - mode: 0644 |
| 85 | + mode: "0644" |
86 | 86 | loop: "{{ nginx_config_http_template }}"
|
87 | 87 | loop_control:
|
88 | 88 | label: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/default.conf') }}"
|
|
94 | 94 | src: "{{ nginx_config_status_template_file | default('http/status.conf.j2') }}"
|
95 | 95 | dest: "{{ nginx_config_status_file_location | default('/etc/nginx/conf.d/status.conf') }}"
|
96 | 96 | backup: "{{ nginx_config_status_backup | default(true) }}"
|
97 |
| - mode: 0644 |
| 97 | + mode: "0644" |
98 | 98 | notify: (Handler - NGINX Config) Run NGINX
|
99 | 99 | when: nginx_config_status_enable | bool
|
100 | 100 |
|
|
103 | 103 | src: "{{ nginx_config_rest_api_template_file | default('http/api.conf.j2') }}"
|
104 | 104 | dest: "{{ nginx_config_rest_api_file_location | default('/etc/nginx/conf.d/api.conf') }}"
|
105 | 105 | backup: "{{ nginx_config_rest_api_backup | default(true) }}"
|
106 |
| - mode: 0644 |
| 106 | + mode: "0644" |
107 | 107 | notify: (Handler - NGINX Config) Run NGINX
|
108 | 108 | when: nginx_config_rest_api_enable | bool
|
109 | 109 |
|
110 | 110 | - name: Ensure NGINX stream directory exists
|
111 | 111 | ansible.builtin.file:
|
112 | 112 | path: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/') | dirname }}"
|
113 | 113 | state: directory
|
114 |
| - mode: 0755 |
| 114 | + mode: "0755" |
115 | 115 | loop: "{{ nginx_config_stream_template }}"
|
116 | 116 | loop_control:
|
117 | 117 | label: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/') | dirname }}"
|
|
122 | 122 | src: "{{ item['template_file'] | default('stream/default.conf.j2') }}"
|
123 | 123 | dest: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/stream_default.conf') }}"
|
124 | 124 | backup: true
|
125 |
| - mode: 0644 |
| 125 | + mode: "0644" |
126 | 126 | loop: "{{ nginx_config_stream_template }}"
|
127 | 127 | loop_control:
|
128 | 128 | label: "{{ item['deployment_location'] | default('/etc/nginx/conf.d/stream_default.conf') }}"
|
|
0 commit comments