mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Support 'apply' to apply attributes to included tasks - Impl 1 (#39236)
* Support 'apply' to apply attributes to included tasks * Cannot validate args for task_include * Only allow apply on include_ * Re-enable arg validation, but only for include_tasks and import_tasks * s/task/ir/ * Add tests for include_ apply * Include context with AnsibleParserError * Add docs for apply * version_added * Add free-form documentation back * Add example of free-form with apply
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
---
|
||||
- hosts: testhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- include_tasks:
|
||||
file: include_tasks.yml
|
||||
apply:
|
||||
tags:
|
||||
- foo
|
||||
tags:
|
||||
- always
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- include_tasks_result is defined
|
||||
tags:
|
||||
- always
|
||||
|
||||
- include_role:
|
||||
name: include_role
|
||||
apply:
|
||||
tags:
|
||||
- foo
|
||||
tags:
|
||||
- always
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- include_role_result is defined
|
||||
tags:
|
||||
- always
|
||||
Reference in New Issue
Block a user