roles/nginx: Use dynamic include_tasks for Let's Encrypt
Use dynamic includes instead of static imports when you are running tasks conditionally or using variable interpolation. The down side is that you need to then tag the parent task as well as all child tasks, as tags only apply to children of statically imported tasks.
This commit is contained in:
@ -32,7 +32,7 @@
|
||||
loop: "{{ nginx_vhosts }}"
|
||||
tags: wordpress
|
||||
|
||||
- import_tasks: letsencrypt.yml
|
||||
- include_tasks: letsencrypt.yml
|
||||
when: use_letsencrypt is defined and use_letsencrypt == True
|
||||
tags: letsencrypt
|
||||
|
||||
|
Reference in New Issue
Block a user