|
105 | 105 | cmd: > |
106 | 106 | ./acme.sh |
107 | 107 | --issue |
108 | | - --config-home "{{ run_acmesh_cfg_config_home }}" |
109 | | - --certhome "{{ run_acmesh_cfg_cert_home }}" |
| 108 | + --config-home {{ run_acmesh_cfg_config_home | ansible.builtin.quote }} |
| 109 | + --certhome {{ run_acmesh_cfg_cert_home | ansible.builtin.quote }} |
110 | 110 | {% for item_domain in item['domains'] %} |
111 | | - --domain "{{ item_domain['name'] }}" |
112 | | - {{ '--dns "' ~ item_domain['challenge']['dns_provider'] ~ '"' |
| 111 | + --domain {{ item_domain['name'] | ansible.builtin.quote }} |
| 112 | + {{ '--dns ' ~ (item_domain['challenge']['dns_provider'] | ansible.builtin.quote) |
113 | 113 | if ((item_domain['challenge'] is defined) and |
114 | 114 | (item_domain['challenge']['type'] is defined) and |
115 | 115 | (item_domain['challenge']['type'] == 'dns') and |
116 | 116 | (item_domain['challenge']['dns_provider'] is defined) and |
117 | 117 | (item_domain['challenge']['dns_provider'])) |
118 | 118 | else |
119 | 119 | '' }} |
120 | | - {{ '--domain-alias "' ~ item_domain['challenge']['domain_alias'] ~ '"' |
| 120 | + {{ '--domain-alias ' ~ (item_domain['challenge']['domain_alias'] | ansible.builtin.quote) |
121 | 121 | if ((item_domain['challenge']['domain_alias'] is defined) and |
122 | 122 | (item_domain['challenge']['domain_alias'])) |
123 | 123 | else |
124 | 124 | '' }} |
125 | | - {{ '--challenge-alias "' ~ item_domain['challenge']['challenge_alias'] ~ '"' |
| 125 | + {{ '--challenge-alias ' ~ (item_domain['challenge']['challenge_alias'] | ansible.builtin.quote) |
126 | 126 | if ((item_domain['challenge']['challenge_alias'] is defined) and |
127 | 127 | (item_domain['challenge']['challenge_alias'])) |
128 | 128 | else |
129 | 129 | '' }} |
130 | | - {{ '--webroot "' ~ item_domain['challenge']['webroot'] ~ '"' |
| 130 | + {{ '--webroot ' ~ (item_domain['challenge']['webroot'] | ansible.builtin.quote) |
131 | 131 | if ((item_domain['challenge'] is defined) and |
132 | 132 | (item_domain['challenge']['type'] is defined) and |
133 | 133 | (item_domain['challenge']['type'] == 'webroot') and |
|
141 | 141 | (item_domain['challenge']['type'] == 'standalone')) |
142 | 142 | else |
143 | 143 | '' }} |
144 | | - {{ '--httpport ' ~ item_domain['challenge']['httpport'] |
| 144 | + {{ '--httpport ' ~ (item_domain['challenge']['httpport'] | ansible.builtin.quote) |
145 | 145 | if ((item_domain['challenge']['httpport'] is defined) and |
146 | 146 | (item_domain['challenge']['httpport'])) |
147 | 147 | else |
|
152 | 152 | (item_domain['challenge']['type'] == 'alpn')) |
153 | 153 | else |
154 | 154 | '' }} |
155 | | - {{ '--tlsport ' ~ item_domain['challenge']['tlsport'] |
| 155 | + {{ '--tlsport ' ~ (item_domain['challenge']['tlsport'] | ansible.builtin.quote) |
156 | 156 | if ((item_domain['challenge']['tlsport'] is defined) and |
157 | 157 | (item_domain['challenge']['tlsport'])) |
158 | 158 | else |
|
168 | 168 | (item['debug'])) |
169 | 169 | else |
170 | 170 | '' }} |
171 | | - {{ '--dnssleep ' ~ (item['dnssleep'] | int) |
| 171 | + {{ '--dnssleep ' ~ (item['dnssleep'] | ansible.builtin.quote) |
172 | 172 | if (item['dnssleep'] is defined) |
173 | 173 | else |
174 | 174 | '' }} |
175 | | - {{ '--pre-hook "' ~ item['pre_hook'] ~ '"' |
| 175 | + {{ '--pre-hook ' ~ (item['pre_hook'] | ansible.builtin.quote) |
176 | 176 | if ((item['pre_hook'] is defined) and |
177 | 177 | (item['pre_hook'])) |
178 | 178 | else |
179 | 179 | '' }} |
180 | | - {{ '--post-hook "' ~ item['post_hook'] ~ '"' |
| 180 | + {{ '--post-hook ' ~ (item['post_hook'] | ansible.builtin.quote) |
181 | 181 | if ((item['post_hook'] is defined) and |
182 | 182 | (item['post_hook'])) |
183 | 183 | else |
184 | 184 | '' }} |
185 | | - {{ '--renew-hook "' ~ item['renew_hook'] ~ '"' |
| 185 | + {{ '--renew-hook ' ~ (item['renew_hook'] | ansible.builtin.quote) |
186 | 186 | if ((item['renew_hook'] is defined) and |
187 | 187 | (item['renew_hook'])) |
188 | 188 | else |
189 | 189 | '' }} |
190 | | - {{ '--server "' ~ item['server'] ~ '"' |
| 190 | + {{ '--server ' ~ (item['server'] | ansible.builtin.quote) |
191 | 191 | if ((item['server'] is defined) and |
192 | 192 | (item['server'])) |
193 | 193 | else |
|
275 | 275 | cmd: > |
276 | 276 | ./acme.sh |
277 | 277 | --install-cert |
278 | | - --config-home "{{ run_acmesh_cfg_config_home }}" |
279 | | - --certhome "{{ run_acmesh_cfg_cert_home }}" |
280 | | - --domain "{{ item['domains'][0]['name'] }}" |
281 | | - {{ '--ca-file "' ~ item['install']['ca_file'] ~ '"' |
| 278 | + --config-home {{ run_acmesh_cfg_config_home | ansible.builtin.quote }} |
| 279 | + --certhome {{ run_acmesh_cfg_cert_home | ansible.builtin.quote }} |
| 280 | + --domain {{ item['domains'][0]['name'] | ansible.builtin.quote }} |
| 281 | + {{ '--ca-file ' ~ (item['install']['ca_file'] | ansible.builtin.quote) |
282 | 282 | if ((item['install']['ca_file'] is defined) and |
283 | 283 | (item['install']['ca_file'])) |
284 | 284 | else |
285 | 285 | '' }} |
286 | | - {{ '--cert-file "' ~ item['install']['cert_file'] ~ '"' |
| 286 | + {{ '--cert-file ' ~ (item['install']['cert_file'] | ansible.builtin.quote) |
287 | 287 | if ((item['install']['cert_file'] is defined) and |
288 | 288 | (item['install']['cert_file'])) |
289 | 289 | else |
290 | 290 | '' }} |
291 | | - {{ '--fullchain-file "' ~ item['install']['fullcain_file'] ~ '"' |
| 291 | + {{ '--fullchain-file ' ~ (item['install']['fullcain_file'] | ansible.builtin.quote) |
292 | 292 | if ((item['install']['fullcain_file'] is defined) and |
293 | 293 | (item['install']['fullcain_file'])) |
294 | 294 | else |
295 | 295 | '' }} |
296 | | - {{ '--key-file "' ~ item['install']['key_file'] ~ '"' |
| 296 | + {{ '--key-file ' ~ (item['install']['key_file'] | ansible.builtin.quote) |
297 | 297 | if ((item['install']['key_file'] is defined) and |
298 | 298 | (item['install']['key_file'])) |
299 | 299 | else |
300 | 300 | '' }} |
301 | | - {{ '--reloadcmd "' ~ item['install']['reloadcmd'] ~ '"' |
| 301 | + {{ '--reloadcmd ' ~ (item['install']['reloadcmd'] | ansible.builtin.quote) |
302 | 302 | if ((item['install']['reloadcmd'] is defined) and |
303 | 303 | (item['install']['reloadcmd'])) |
304 | 304 | else |
|
333 | 333 | - name: "Cert | Default | Gather certificate information" |
334 | 334 | ansible.builtin.command: |
335 | 335 | cmd: > |
336 | | - ./acme.sh --list --certhome "{{ run_acmesh_cfg_cert_home }}" |
| 336 | + ./acme.sh --list --certhome {{ run_acmesh_cfg_cert_home | ansible.builtin.quote }} |
337 | 337 | args: |
338 | 338 | chdir: "{{ run_acmesh_cfg_home }}" |
339 | 339 | when: |
|
0 commit comments