forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow omit to work with include_role from_args (ansible#74879)
* Allow omit to work with include_role from_args. Fixes ansible#66349 * Add clog frag
- Loading branch information
Showing
5 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
minor_changes: | ||
- >- | ||
``include_role`` - Allow use of ``omit`` in the ``from_*`` arguments | ||
(https://github.com/ansible/ansible/issues/66349) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
test/integration/targets/include_import/include_role_omit/playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- hosts: localhost | ||
gather_facts: false | ||
vars: | ||
include_role_omit: false | ||
tasks: | ||
- include_role: | ||
name: foo | ||
tasks_from: '{{ omit }}' | ||
|
||
- assert: | ||
that: | ||
- include_role_omit is sameas(true) |
2 changes: 2 additions & 0 deletions
2
test/integration/targets/include_import/include_role_omit/roles/foo/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- set_fact: | ||
include_role_omit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters