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
71867f94
Commit
71867f94
authored
Jul 29, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove vars attribute from base
Fixes #11779
parent
132c14eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
lib/ansible/playbook/base.py
+1
-2
lib/ansible/playbook/block.py
+0
-1
lib/ansible/playbook/play.py
+1
-0
lib/ansible/playbook/task.py
+2
-1
test/integration/Makefile
+1
-1
No files found.
lib/ansible/playbook/base.py
View file @
71867f94
...
...
@@ -47,8 +47,7 @@ class Base:
_port
=
FieldAttribute
(
isa
=
'int'
)
_remote_user
=
FieldAttribute
(
isa
=
'string'
)
# vars and flags
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
# flags and misc. settings
_environment
=
FieldAttribute
(
isa
=
'list'
,
default
=
[])
_no_log
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
...
...
lib/ansible/playbook/block.py
View file @
71867f94
...
...
@@ -62,7 +62,6 @@ class Block(Base, Become, Conditional, Taggable):
if
self
.
_task_include
:
all_vars
.
update
(
self
.
_task_include
.
get_vars
())
all_vars
.
update
(
self
.
vars
)
return
all_vars
@staticmethod
...
...
lib/ansible/playbook/play.py
View file @
71867f94
...
...
@@ -64,6 +64,7 @@ class Play(Base, Taggable, Become):
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
''
)
# Variable Attributes
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_vars_files
=
FieldAttribute
(
isa
=
'list'
,
default
=
[])
_vars_prompt
=
FieldAttribute
(
isa
=
'list'
,
default
=
[])
_vault_password
=
FieldAttribute
(
isa
=
'string'
)
...
...
lib/ansible/playbook/task.py
View file @
71867f94
...
...
@@ -91,6 +91,7 @@ class Task(Base, Conditional, Taggable, Become):
self
.
_block
=
block
self
.
_role
=
role
self
.
_task_include
=
task_include
self
.
_vars
=
dict
()
super
(
Task
,
self
)
.
__init__
()
...
...
@@ -193,7 +194,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
:
...
...
test/integration/Makefile
View file @
71867f94
...
...
@@ -73,7 +73,7 @@ test_hash:
ANSIBLE_HASH_BEHAVIOUR
=
merge ansible-playbook test_hash.yml
-i
$(INVENTORY)
$(CREDENTIALS_ARG)
-v
-e
'{"test_hash":{"extra_args":"this is an extra arg"}}'
test_var_precedence
:
ansible-playbook test_var_precedence.yml
-i
$(INVENTORY)
$(CREDENTIALS_ARG)
-v
-e
'extra_var=extra_var'
-e
'extra_var_override=extra_var_override'
ansible-playbook test_var_precedence.yml
-i
$(INVENTORY)
$(CREDENTIALS_ARG)
$(TEST_FLAGS)
-v
-e
'extra_var=extra_var'
-e
'extra_var_override=extra_var_override'
test_vault
:
ansible-playbook test_vault.yml
-i
$(INVENTORY)
$(CREDENTIALS_ARG)
-v
$(TEST_FLAGS)
--vault-password-file
$(VAULT_PASSWORD_FILE)
--list-tasks
...
...
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