Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
7b1c6fba
Commit
7b1c6fba
authored
May 11, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix playbook includes so tags are obeyed (v2)
parent
daf533c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
lib/ansible/playbook/playbook_include.py
+3
-2
samples/included_playbook.yml
+6
-0
samples/test_playbook.include
+2
-0
No files found.
lib/ansible/playbook/playbook_include.py
View file @
7b1c6fba
...
...
@@ -61,10 +61,11 @@ class PlaybookInclude(Base, Taggable):
pb
.
_load_playbook_data
(
file_name
=
file_name
,
variable_manager
=
variable_manager
)
# finally,
playbook includes can specify a list of variables, which are simply
#
used to update the vars of each play in the playbook
# finally,
update each loaded playbook entry with any variables specified
#
on the included playbook and/or any tags which may have been set
for
entry
in
pb
.
_entries
:
entry
.
vars
.
update
(
new_obj
.
vars
)
entry
.
tags
=
list
(
set
(
entry
.
tags
)
.
union
(
new_obj
.
tags
))
return
pb
...
...
samples/included_playbook.yml
0 → 100644
View file @
7b1c6fba
-
hosts
:
localhost
gather_facts
:
no
tags
:
-
included
tasks
:
-
debug
:
msg="incuded playbook, variable is {{a}}"
samples/test_playbook.include
0 → 100644
View file @
7b1c6fba
- include: included_playbook.yml a=1
tags: include
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment