|
49 | 49 | state: directory
|
50 | 50 | owner: "{{ nginx_config_main_template.user | default('nginx') }}"
|
51 | 51 | mode: 0755
|
52 |
| - loop: |
53 |
| - "{{ nginx_config_http_template }}" |
| 52 | + loop: "{{ nginx_config_http_template }}" |
| 53 | + loop_control: |
| 54 | + label: "{{ item.config.core.client_body_temp_path.path | default('config.core.client_body_temp_path.path undefined') }}" |
54 | 55 | when:
|
55 | 56 | - nginx_config_http_template_enable | bool
|
56 | 57 | - item.config.core.client_body_temp_path.path is defined
|
|
61 | 62 | state: directory
|
62 | 63 | owner: "{{ nginx_config_main_template.user | default('nginx') }}"
|
63 | 64 | mode: 0755
|
64 |
| - with_subelements: |
65 |
| - - "{{ nginx_config_http_template }}" |
66 |
| - - config.proxy.cache_path |
67 |
| - - skip_missing: true |
| 65 | + loop: "{{ nginx_config_http_template | subelements('config.proxy.cache_path', skip_missing=True) }}" |
| 66 | + loop_control: |
| 67 | + label: "{{ item.1.path | default('config.proxy.cache_path.path undefined') }}" |
68 | 68 | when: nginx_config_http_template_enable | bool
|
69 | 69 |
|
70 | 70 | - name: Ensure NGINX HTTP directory exists
|
|
73 | 73 | state: directory
|
74 | 74 | mode: 0755
|
75 | 75 | loop: "{{ nginx_config_http_template }}"
|
| 76 | + loop_control: |
| 77 | + label: "{{ item.deployment_location | default('/etc/nginx/conf.d/') | dirname }}" |
76 | 78 | when: nginx_config_http_template_enable | bool
|
77 | 79 |
|
78 | 80 | - name: Dynamically generate NGINX HTTP config files
|
|
82 | 84 | backup: "{{ item.backup | default(true) }}"
|
83 | 85 | mode: 0644
|
84 | 86 | loop: "{{ nginx_config_http_template }}"
|
| 87 | + loop_control: |
| 88 | + label: "{{ item.deployment_location | default('/etc/nginx/conf.d/default.conf') }}" |
85 | 89 | when: nginx_config_http_template_enable | bool
|
86 | 90 | notify: (Handler - NGINX Config) Run NGINX
|
87 | 91 |
|
|
109 | 113 | state: directory
|
110 | 114 | mode: 0755
|
111 | 115 | loop: "{{ nginx_config_stream_template }}"
|
| 116 | + loop_control: |
| 117 | + label: "{{ item.deployment_location | default('/etc/nginx/conf.d/') | dirname }}" |
112 | 118 | when: nginx_config_stream_template_enable | bool
|
113 | 119 |
|
114 | 120 | - name: Dynamically generate NGINX stream config files
|
|
118 | 124 | backup: true
|
119 | 125 | mode: 0644
|
120 | 126 | loop: "{{ nginx_config_stream_template }}"
|
| 127 | + loop_control: |
| 128 | + label: "{{ item.deployment_location | default('/etc/nginx/conf.d/stream_default.conf') }}" |
121 | 129 | notify: (Handler - NGINX Config) Run NGINX
|
122 | 130 | when: nginx_config_stream_template_enable | bool
|
0 commit comments