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
976f51e5
Commit
976f51e5
authored
Jan 19, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9968 from bcoca/v2_play_env
V2: added environment to play
parents
4603e9ce
b250e138
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
+12
-1
v2/ansible/executor/connection_info.py
+11
-1
v2/ansible/playbook/play.py
+1
-0
No files found.
v2/ansible/executor/connection_info.py
View file @
976f51e5
...
...
@@ -79,6 +79,10 @@ class ConnectionInformation:
self
.
sudo_user
=
play
.
sudo_user
self
.
sudo_pass
=
play
.
sudo_pass
# non connection related
self
.
no_log
=
play
.
no_log
self
.
environment
=
play
.
environment
def
set_options
(
self
,
options
):
'''
Configures this connection information instance with data from
...
...
@@ -127,6 +131,12 @@ class ConnectionInformation:
self
.
sudo_user
=
ci
.
sudo_user
self
.
sudo_pass
=
ci
.
sudo_pass
self
.
verbosity
=
ci
.
verbosity
# other
self
.
no_log
=
ci
.
no_log
self
.
environment
=
ci
.
environment
# requested tags
self
.
only_tags
=
ci
.
only_tags
.
copy
()
self
.
skip_tags
=
ci
.
skip_tags
.
copy
()
...
...
@@ -139,7 +149,7 @@ class ConnectionInformation:
new_info
=
ConnectionInformation
()
new_info
.
copy
(
self
)
for
attr
in
(
'connection'
,
'remote_user'
,
'su'
,
'su_user'
,
'su_pass'
,
'sudo'
,
'sudo_user'
,
'sudo_pass'
):
for
attr
in
(
'connection'
,
'remote_user'
,
'su'
,
'su_user'
,
'su_pass'
,
'sudo'
,
'sudo_user'
,
'sudo_pass'
,
'environment'
,
'no_log'
):
if
hasattr
(
task
,
attr
):
attr_val
=
getattr
(
task
,
attr
)
if
attr_val
:
...
...
v2/ansible/playbook/play.py
View file @
976f51e5
...
...
@@ -80,6 +80,7 @@ class Play(Base, Taggable):
# Flag/Setting Attributes
_any_errors_fatal
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
_environment
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_max_fail_percentage
=
FieldAttribute
(
isa
=
'string'
,
default
=
'0'
)
_no_log
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
_serial
=
FieldAttribute
(
isa
=
'int'
,
default
=
0
)
...
...
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