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
d5b8553d
Commit
d5b8553d
authored
Sep 17, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1056 from dhozac/task-transport
Allow transport on tasks, and use it for local_action
parents
7df0e525
dd11b013
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
lib/ansible/playbook/__init__.py
+1
-1
lib/ansible/playbook/task.py
+4
-2
No files found.
lib/ansible/playbook/__init__.py
View file @
d5b8553d
...
@@ -223,7 +223,7 @@ class PlayBook(object):
...
@@ -223,7 +223,7 @@ class PlayBook(object):
setup_cache
=
self
.
SETUP_CACHE
,
basedir
=
task
.
play
.
basedir
,
setup_cache
=
self
.
SETUP_CACHE
,
basedir
=
task
.
play
.
basedir
,
conditional
=
task
.
only_if
,
callbacks
=
self
.
runner_callbacks
,
conditional
=
task
.
only_if
,
callbacks
=
self
.
runner_callbacks
,
sudo
=
task
.
play
.
sudo
,
sudo_user
=
task
.
play
.
sudo_user
,
sudo
=
task
.
play
.
sudo
,
sudo_user
=
task
.
play
.
sudo_user
,
transport
=
task
.
play
.
transport
,
sudo_pass
=
self
.
sudo_pass
,
is_playbook
=
True
transport
=
task
.
transport
,
sudo_pass
=
self
.
sudo_pass
,
is_playbook
=
True
)
)
if
task
.
async_seconds
==
0
:
if
task
.
async_seconds
==
0
:
...
...
lib/ansible/playbook/task.py
View file @
d5b8553d
...
@@ -26,14 +26,14 @@ class Task(object):
...
@@ -26,14 +26,14 @@ class Task(object):
'notify'
,
'module_name'
,
'module_args'
,
'module_vars'
,
'notify'
,
'module_name'
,
'module_args'
,
'module_vars'
,
'play'
,
'notified_by'
,
'tags'
,
'register'
,
'with_items'
,
'play'
,
'notified_by'
,
'tags'
,
'register'
,
'with_items'
,
'delegate_to'
,
'first_available_file'
,
'ignore_errors'
,
'delegate_to'
,
'first_available_file'
,
'ignore_errors'
,
'local_action'
'local_action'
,
'transport'
]
]
# to prevent typos and such
# to prevent typos and such
VALID_KEYS
=
[
VALID_KEYS
=
[
'name'
,
'action'
,
'only_if'
,
'async'
,
'poll'
,
'notify'
,
'with_items'
,
'name'
,
'action'
,
'only_if'
,
'async'
,
'poll'
,
'notify'
,
'with_items'
,
'first_available_file'
,
'include'
,
'tags'
,
'register'
,
'ignore_errors'
,
'first_available_file'
,
'include'
,
'tags'
,
'register'
,
'ignore_errors'
,
'delegate_to'
,
'local_action'
'delegate_to'
,
'local_action'
,
'transport'
]
]
def
__init__
(
self
,
play
,
ds
,
module_vars
=
None
):
def
__init__
(
self
,
play
,
ds
,
module_vars
=
None
):
...
@@ -61,9 +61,11 @@ class Task(object):
...
@@ -61,9 +61,11 @@ class Task(object):
elif
'local_action'
in
ds
:
elif
'local_action'
in
ds
:
self
.
action
=
ds
.
get
(
'local_action'
,
''
)
self
.
action
=
ds
.
get
(
'local_action'
,
''
)
self
.
delegate_to
=
'127.0.0.1'
self
.
delegate_to
=
'127.0.0.1'
self
.
transport
=
'local'
else
:
else
:
self
.
action
=
ds
.
get
(
'action'
,
''
)
self
.
action
=
ds
.
get
(
'action'
,
''
)
self
.
delegate_to
=
ds
.
get
(
'delegate_to'
,
None
)
self
.
delegate_to
=
ds
.
get
(
'delegate_to'
,
None
)
self
.
transport
=
ds
.
get
(
'transport'
,
play
.
transport
)
# notified by is used by Playbook code to flag which hosts
# notified by is used by Playbook code to flag which hosts
# need to run a notifier
# need to run a notifier
...
...
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