From f91cbf4d00a2482611399e2a2a6d1e6fa6854da9 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sun, 20 Sep 2020 15:40:07 -0700 Subject: [PATCH] test cleanup and trying to replicate synchronize fails --- .ci/localhost_ansible_install.py | 5 +++-- .ci/localhost_ansible_tests.py | 8 -------- ansible_mitogen/mixins.py | 7 +++++++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.ci/localhost_ansible_install.py b/.ci/localhost_ansible_install.py index 87bb18e7..dd9fa025 100755 --- a/.ci/localhost_ansible_install.py +++ b/.ci/localhost_ansible_install.py @@ -7,13 +7,14 @@ batches = [ # Must be installed separately, as PyNACL indirect requirement causes # newer version to be installed if done in a single pip run. # Separately install ansible based on version passed in from azure-pipelines.yml or .travis.yml - 'pip install "pycparser<2.19" "idna<2.7"', + 'pip install "pycparser<2.19" "idna<2.7" virtualenv', 'pip install ' '-r tests/requirements.txt ' '-r tests/ansible/requirements.txt', # 'pip install -q ansible=={}'.format(ci_lib.ANSIBLE_VERSION) # ansible v2.10 isn't out yet so we're installing from github for now - 'pip install -q {}'.format(ci_lib.ANSIBLE_VERSION) + # Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version. + 'pip install -q virtualenv {}'.format(ci_lib.ANSIBLE_VERSION) ] ] diff --git a/.ci/localhost_ansible_tests.py b/.ci/localhost_ansible_tests.py index 89ea3457..9334ebc9 100755 --- a/.ci/localhost_ansible_tests.py +++ b/.ci/localhost_ansible_tests.py @@ -20,14 +20,6 @@ with ci_lib.Fold('unit_tests'): with ci_lib.Fold('job_setup'): - # Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version. - # run("pip install -q virtualenv ansible==%s", ci_lib.ANSIBLE_VERSION) - # ansible v2.10 isn't out yet so we're installing from github for now - run('pip install -q virtualenv {}'.format(ci_lib.ANSIBLE_VERSION)) - - # after ansible is installed, install common collections until ansible==2.10 comes out - run('ansible-galaxy collection install community.general') - os.chmod(KEY_PATH, int('0600', 8)) if not ci_lib.exists_in_path('sshpass'): run("brew install http://git.io/sshpass.rb") diff --git a/ansible_mitogen/mixins.py b/ansible_mitogen/mixins.py index 7e7a3ff0..34e71b63 100644 --- a/ansible_mitogen/mixins.py +++ b/ansible_mitogen/mixins.py @@ -398,6 +398,13 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase): # on _execute_module(). self._remove_tmp_path(tmp) + # self._remove_tmp_path(self._connection._shell.tmpdir) + # jjjj + # if module_name == 'ansible.posix.synchronize': + # # import epdb; epdb.set_trace() + # from ansible.plugins.action import get_with_context_result + # self._remove_tmp_path(self._connection._shell.tmpdir) + # prevents things like discovered_interpreter_* or ansible_discovered_interpreter_* from being set # handle ansible 2.3.3 that has remove_internal_keys in a different place check = remove_internal_keys(result)