mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-24 04:43:04 +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
|
||||
tags: ['sublime-text']
|
||||
|
||||
- name: Run configured post-provision ansible task files.
|
||||
include_tasks: "{{ outer_item }}"
|
||||
loop_control:
|
||||
loop_var: outer_item
|
||||
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
|
||||
- block:
|
||||
- name: Run configured post-provision ansible task files.
|
||||
include_tasks: "{{ outer_item }}"
|
||||
loop_control:
|
||||
loop_var: outer_item
|
||||
with_fileglob: "{{ post_provision_tasks|default(omit) }}"
|
||||
tags: ['post']
|
||||
|
|
Loading…
Reference in a new issue