mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-27 22:30:34 +00:00
Add tag inheritance to post-provision tasks (#146)
Imported tasks inherit tags but Included tasks don't. This leads to confusion because included tasks need to have an explicit tag added or they won't run. This is the workaround provided and [documented](https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html#tag-inheritance-for-includes-blocks-and-the-apply-keyword) by Ansible to add tag inheritance to included tasks.
This commit is contained in:
parent
5b6cf0ab1a
commit
2f819d61bf
1 changed files with 6 additions and 5 deletions
11
main.yml
11
main.yml
|
@ -45,9 +45,10 @@
|
||||||
when: configure_sublime
|
when: configure_sublime
|
||||||
tags: ['sublime-text']
|
tags: ['sublime-text']
|
||||||
|
|
||||||
- name: Run configured post-provision ansible task files.
|
- block:
|
||||||
include_tasks: "{{ outer_item }}"
|
- name: Run configured post-provision ansible task files.
|
||||||
loop_control:
|
include_tasks: "{{ outer_item }}"
|
||||||
loop_var: outer_item
|
loop_control:
|
||||||
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
|
loop_var: outer_item
|
||||||
|
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
|
||||||
tags: ['post']
|
tags: ['post']
|
||||||
|
|
Loading…
Reference in a new issue