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
efcad3aa
Commit
efcad3aa
authored
Jul 30, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-allow vars on tasks, specifically for includes
parent
0ad52a40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
lib/ansible/playbook/task.py
+2
-8
No files found.
lib/ansible/playbook/task.py
View file @
efcad3aa
...
...
@@ -68,22 +68,17 @@ class Task(Base, Conditional, Taggable, Become):
_failed_when
=
FieldAttribute
(
isa
=
'string'
)
_first_available_file
=
FieldAttribute
(
isa
=
'list'
)
_ignore_errors
=
FieldAttribute
(
isa
=
'bool'
)
_loop
=
FieldAttribute
(
isa
=
'string'
,
private
=
True
)
_loop_args
=
FieldAttribute
(
isa
=
'list'
,
private
=
True
)
_local_action
=
FieldAttribute
(
isa
=
'string'
)
# FIXME: this should not be a Task
_meta
=
FieldAttribute
(
isa
=
'string'
)
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
''
)
_notify
=
FieldAttribute
(
isa
=
'list'
)
_poll
=
FieldAttribute
(
isa
=
'int'
)
_register
=
FieldAttribute
(
isa
=
'string'
)
_retries
=
FieldAttribute
(
isa
=
'int'
,
default
=
1
)
_run_once
=
FieldAttribute
(
isa
=
'bool'
)
_until
=
FieldAttribute
(
isa
=
'list'
)
# ?
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
def
__init__
(
self
,
block
=
None
,
role
=
None
,
task_include
=
None
):
''' constructors a task, without the Task.load classmethod, it will be pretty blank '''
...
...
@@ -91,7 +86,6 @@ class Task(Base, Conditional, Taggable, Become):
self
.
_block
=
block
self
.
_role
=
role
self
.
_task_include
=
task_include
self
.
_vars
=
dict
()
super
(
Task
,
self
)
.
__init__
()
...
...
@@ -194,7 +188,7 @@ class Task(Base, Conditional, Taggable, Become):
super
(
Task
,
self
)
.
post_validate
(
templar
)
def
get_vars
(
self
):
all_vars
=
self
.
_
vars
.
copy
()
all_vars
=
self
.
vars
.
copy
()
if
self
.
_block
:
all_vars
.
update
(
self
.
_block
.
get_vars
())
if
self
.
_task_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