-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aef6dc2
commit 0b08e30
Showing
11 changed files
with
47 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,2 @@ | ||
bugfixes: | ||
- include_vars.py - Ensured that all files specified in the directory are included and that we iterate over all files (https://github.com/ansible/ansible/issues/80987). |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub1/sub11.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 @@ | ||
var1: sub1var1 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub1/sub11/config11-2.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 @@ | ||
insidevar11-2: config11-2 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub1/sub11/config11.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 @@ | ||
insidevar1: config11 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub1/sub12.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 @@ | ||
var12: sub1var2 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub2/sub21.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 @@ | ||
var21: sub21 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub2/sub21/config211.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 @@ | ||
insidevar2: config211 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub2/sub21/config212.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 @@ | ||
insidervariable: config212 |
1 change: 1 addition & 0 deletions
1
test/integration/targets/include_vars-ad-hoc/dir/sub3/config3.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 @@ | ||
variable3: config3 |
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,19 @@ | ||
- name: Include vars example | ||
hosts: localhost | ||
|
||
tasks: | ||
- name: Include all yml configuration files from folder "{{ my_config_folder }}" | ||
vars: | ||
my_config_folder: "dir/" | ||
ansible.builtin.include_vars: | ||
dir: "{{ my_config_folder }}" | ||
extensions: | ||
- 'yml' | ||
- 'yaml' | ||
ignore_unknown_extensions: 'yes' | ||
depth: 3 | ||
name: my_include_vars | ||
|
||
- name: Print included params | ||
debug: | ||
var: my_include_vars |
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