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
27fcf1a4
Commit
27fcf1a4
authored
Jul 08, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in registered variables related to delegate_to changes
parent
f5baad4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
lib/ansible/executor/process/result.py
+1
-1
lib/ansible/plugins/strategies/__init__.py
+8
-0
test/integration/roles/test_template/tasks/main.yml
+1
-1
No files found.
lib/ansible/executor/process/result.py
View file @
27fcf1a4
...
@@ -107,7 +107,7 @@ class ResultProcess(multiprocessing.Process):
...
@@ -107,7 +107,7 @@ class ResultProcess(multiprocessing.Process):
# if this task is registering a result, do it now
# if this task is registering a result, do it now
if
result
.
_task
.
register
:
if
result
.
_task
.
register
:
self
.
_send_result
((
'
set_host_var'
,
result
.
_host
,
result
.
_task
,
None
,
result
.
_task
.
register
,
result
.
_result
))
self
.
_send_result
((
'
register_host_var'
,
result
.
_host
,
result
.
_task
.
register
,
result
.
_result
))
# send callbacks, execute other options based on the result status
# send callbacks, execute other options based on the result status
# FIXME: this should all be cleaned up and probably moved to a sub-function.
# FIXME: this should all be cleaned up and probably moved to a sub-function.
...
...
lib/ansible/plugins/strategies/__init__.py
View file @
27fcf1a4
...
@@ -223,6 +223,14 @@ class StrategyBase:
...
@@ -223,6 +223,14 @@ class StrategyBase:
if
host
not
in
self
.
_notified_handlers
[
handler_name
]:
if
host
not
in
self
.
_notified_handlers
[
handler_name
]:
self
.
_notified_handlers
[
handler_name
]
.
append
(
host
)
self
.
_notified_handlers
[
handler_name
]
.
append
(
host
)
elif
result
[
0
]
==
'register_host_var'
:
# essentially the same as 'set_host_var' below, however we
# never follow the delegate_to value for registered vars
host
=
result
[
1
]
var_name
=
result
[
2
]
var_value
=
result
[
3
]
self
.
_variable_manager
.
set_host_variable
(
host
,
var_name
,
var_value
)
elif
result
[
0
]
in
(
'set_host_var'
,
'set_host_facts'
):
elif
result
[
0
]
in
(
'set_host_var'
,
'set_host_facts'
):
host
=
result
[
1
]
host
=
result
[
1
]
task
=
result
[
2
]
task
=
result
[
2
]
...
...
test/integration/roles/test_template/tasks/main.yml
View file @
27fcf1a4
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
-
name
:
check what python version ansible is running on
-
name
:
check what python version ansible is running on
command
:
python -c 'import distutils.sysconfig ; print(distutils.sysconfig.get_python_version())'
command
:
python -c 'import distutils.sysconfig ; print(distutils.sysconfig.get_python_version())'
register
:
pyver
register
:
pyver
#
delegate_to: localhost
delegate_to
:
localhost
-
name
:
copy known good into place
-
name
:
copy known good into place
copy
:
src=foo.txt dest={{output_dir}}/foo.txt
copy
:
src=foo.txt dest={{output_dir}}/foo.txt
...
...
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