-
Notifications
You must be signed in to change notification settings - Fork 23.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.9.10: UnboundLocalError: local variable 'module_style' referenced before assignment #70168
Comments
I couldn't reproduce this with an arbitrary lineinfile task. We'll need you to provide a minimal reproducer. |
@mkrizek I added a reproducer. It seems related to |
Can confirm, we have the same problem, though it only triggers in particular case (localhost -> localhost) Playbook:
Results: |
Since we now pass diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py
index 83c7715d3e..62a185a3fd 100644
--- a/lib/ansible/plugins/action/__init__.py
+++ b/lib/ansible/plugins/action/__init__.py
@@ -249,7 +249,9 @@ class ActionBase(with_metaclass(ABCMeta, object)):
# store in local task_vars facts collection for the retry and any other usages in this worker
if use_vars.get('ansible_facts') is None:
task_vars['ansible_facts'] = {}
+ use_vars['ansible_facts'] = {}
task_vars['ansible_facts'][discovered_key] = self._discovered_interpreter
+ use_vars['ansible_facts'][discovered_key] = self._discovered_interpreter
# preserve this so _execute_module can propagate back to controller as a fact
self._discovered_interpreter_key = discovered_key
else: The similar would need to be changed in the |
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible testing Signed-off-by: Guillaume Abrioux <[email protected]>
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible testing Signed-off-by: Guillaume Abrioux <[email protected]>
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible testing Signed-off-by: Guillaume Abrioux <[email protected]>
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible requirements. Signed-off-by: Guillaume Abrioux <[email protected]>
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible requirements. Signed-off-by: Guillaume Abrioux <[email protected]>
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible requirements. Signed-off-by: Guillaume Abrioux <[email protected]> (cherry picked from commit 1525990)
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible requirements. Signed-off-by: Guillaume Abrioux <[email protected]> (cherry picked from commit 1525990)
* Fix storing local task_vars facts for the retry Fixes #70168
Fixes ansible#70168 (cherry picked from commit eaf6086)
* Fix storing local task_vars facts for the retry Fixes ansible#70168 (cherry picked from commit eaf6086)
ansible 2.9.10 seems to have introduced a bug. See ansible/ansible#70168 This commit excludes this version from ceph-ansible requirements. Signed-off-by: Guillaume Abrioux <[email protected]> (cherry picked from commit 1525990)
Reopening since the fix for this was reverted in #70272. |
as per IRC chat in #ansible-devel :
that explains why it's seen in ceph-ansible ci but we aren't seeing it in tripleo ci; in tripleo we forcibly set ansible_python_interpreter [1] |
* Fix storing local task_vars facts for the retry Fixes ansible#70168 (cherry picked from commit eaf6086)
Reproduces the traceback reported in ansible#70168
* Fix storing local task_vars facts for the retry Fixes ansible#70168
Discard ansible-2.9.10 because it has issues with delegate_facts that block us ansible/ansible#70168 Fix python shebang for el8 rpms Change-Id: If2ca8ab58fc5dfeb82e6b48998d0b66128ad2f55 Depends-On: I8b86786d866193d9e399ea0c50e9546d024a0059 Depends-On: I1594f6dd0c20327492ef5acb32305af12d47c0f7
Fixes #70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]>
Fixes ansible#70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]> (cherry picked from commit b05e00e)
Fixes ansible#70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]> (cherry picked from commit b05e00e)
Fixes #70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]> (cherry picked from commit b05e00e)
Fixes #70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]> (cherry picked from commit b05e00e)
* Fix storing local task_vars facts for the retry Fixes ansible#70168
Fixes ansible#70168 ci_complete Co-authored-by: Brian Coca <[email protected]> Co-authored-by: Matt Clay <[email protected]>
SUMMARY
after upgrade from 2.9.9 to 2.9.10 we see an exception in a task using
lineinfiledelegate_facts=true
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: