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
b08e35bb
Commit
b08e35bb
authored
Apr 29, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing tag logic in v2
parent
4bb37b82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
17 deletions
+9
-17
v2/ansible/playbook/block.py
+0
-11
v2/ansible/playbook/taggable.py
+9
-0
v2/ansible/playbook/task.py
+0
-6
No files found.
v2/ansible/playbook/block.py
View file @
b08e35bb
...
...
@@ -235,17 +235,6 @@ class Block(Base, Become, Conditional, Taggable):
return
False
return
super
(
Block
,
self
)
.
evaluate_conditional
(
all_vars
)
def
evaluate_tags
(
self
,
only_tags
,
skip_tags
,
all_vars
):
result
=
False
if
len
(
self
.
_dep_chain
):
for
dep
in
self
.
_dep_chain
:
result
|=
dep
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
if
self
.
_parent_block
is
not
None
:
result
|=
self
.
_parent_block
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
elif
self
.
_role
is
not
None
:
result
|=
self
.
_role
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
return
result
|
super
(
Block
,
self
)
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
def
set_loader
(
self
,
loader
):
self
.
_loader
=
loader
if
self
.
_parent_block
:
...
...
v2/ansible/playbook/taggable.py
View file @
b08e35bb
...
...
@@ -39,6 +39,15 @@ class Taggable:
else
:
raise
AnsibleError
(
'tags must be specified as a list'
,
obj
=
ds
)
def
_get_attr_tags
(
self
):
'''
Override for the 'tags' getattr fetcher, used from Base.
'''
tags
=
self
.
_attributes
[
'tags'
]
if
hasattr
(
self
,
'_get_parent_attribute'
):
tags
.
extend
(
self
.
_get_parent_attribute
(
'tags'
))
return
list
(
set
(
tags
))
def
evaluate_tags
(
self
,
only_tags
,
skip_tags
,
all_vars
):
''' this checks if the current item should be executed depending on tag options '''
...
...
v2/ansible/playbook/task.py
View file @
b08e35bb
...
...
@@ -285,12 +285,6 @@ class Task(Base, Conditional, Taggable, Become):
return
False
return
super
(
Task
,
self
)
.
evaluate_conditional
(
all_vars
)
def
evaluate_tags
(
self
,
only_tags
,
skip_tags
,
all_vars
):
result
=
False
if
self
.
_block
is
not
None
:
result
|=
self
.
_block
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
return
result
|
super
(
Task
,
self
)
.
evaluate_tags
(
only_tags
=
only_tags
,
skip_tags
=
skip_tags
,
all_vars
=
all_vars
)
def
set_loader
(
self
,
loader
):
'''
Sets the loader on this object and recursively on parent, child objects.
...
...
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