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
65ef6a62
Commit
65ef6a62
authored
Oct 11, 2013
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4425 from jeromew/ansible_sudo_user_with_items
Template sudo_user via with_items
parents
d21a0287
dec364ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/ansible/runner/__init__.py
+5
-5
No files found.
lib/ansible/runner/__init__.py
View file @
65ef6a62
...
@@ -171,7 +171,8 @@ class Runner(object):
...
@@ -171,7 +171,8 @@ class Runner(object):
self
.
private_key_file
=
private_key_file
self
.
private_key_file
=
private_key_file
self
.
background
=
background
self
.
background
=
background
self
.
sudo
=
sudo
self
.
sudo
=
sudo
self
.
sudo_user
=
sudo_user
self
.
sudo_user_var
=
sudo_user
self
.
sudo_user
=
None
self
.
sudo_pass
=
sudo_pass
self
.
sudo_pass
=
sudo_pass
self
.
is_playbook
=
is_playbook
self
.
is_playbook
=
is_playbook
self
.
environment
=
environment
self
.
environment
=
environment
...
@@ -431,10 +432,6 @@ class Runner(object):
...
@@ -431,10 +432,6 @@ class Runner(object):
if
self
.
inventory
.
src
()
is
not
None
:
if
self
.
inventory
.
src
()
is
not
None
:
inject
[
'inventory_file'
]
=
self
.
inventory
.
src
()
inject
[
'inventory_file'
]
=
self
.
inventory
.
src
()
# late processing of parameterized sudo_user
if
self
.
sudo_user
is
not
None
:
self
.
sudo_user
=
template
.
template
(
self
.
basedir
,
self
.
sudo_user
,
inject
)
# allow with_foo to work in playbooks...
# allow with_foo to work in playbooks...
items
=
None
items
=
None
items_plugin
=
self
.
module_vars
.
get
(
'items_lookup_plugin'
,
None
)
items_plugin
=
self
.
module_vars
.
get
(
'items_lookup_plugin'
,
None
)
...
@@ -527,6 +524,9 @@ class Runner(object):
...
@@ -527,6 +524,9 @@ class Runner(object):
def
_executor_internal_inner
(
self
,
host
,
module_name
,
module_args
,
inject
,
port
,
is_chained
=
False
,
complex_args
=
None
):
def
_executor_internal_inner
(
self
,
host
,
module_name
,
module_args
,
inject
,
port
,
is_chained
=
False
,
complex_args
=
None
):
''' decides how to invoke a module '''
''' decides how to invoke a module '''
# late processing of parameterized sudo_user (with_items,..)
if
self
.
sudo_user_var
is
not
None
:
self
.
sudo_user
=
template
.
template
(
self
.
basedir
,
self
.
sudo_user_var
,
inject
)
# allow module args to work as a dictionary
# allow module args to work as a dictionary
# though it is usually a string
# though it is usually a string
...
...
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