diff --git a/docs/changelog.rst b/docs/changelog.rst index ac74131d..9a78790b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -33,6 +33,11 @@ v0.2.3 (2018-08-??) Mitogen for Ansible ~~~~~~~~~~~~~~~~~~~ +* `#251 `_, + `#340 `_: Connection Delegation + could establish connections to the wrong target when ``delegate_to:`` is + present. + * `#291 `_: when Mitogen had previously been installed using ``pip`` or ``setuptools``, the globally installed version could conflict with a newer version bundled with an diff --git a/tests/ansible/integration/delegation/stack_construction.yml b/tests/ansible/integration/delegation/stack_construction.yml index c6851a4c..8ab6e51b 100644 --- a/tests/ansible/integration/delegation/stack_construction.yml +++ b/tests/ansible/integration/delegation/stack_construction.yml @@ -18,6 +18,13 @@ - name: integration/delegation/stack_construction.yml hosts: cd-normal + tasks: + # used later for local_action test. + - local_action: custom_python_detect_environment + register: local_env + + +- hosts: cd-normal any_errors_fatal: true tasks: - mitogen_get_stack: @@ -281,6 +288,24 @@ ] +- hosts: cd-newuser-normal-normal + tasks: + - local_action: mitogen_get_stack + register: out + - assert: + that: | + out.result == [ + { + 'kwargs': { + 'python_path': [ + hostvars['cd-normal'].local_env.sys_executable + ], + }, + 'method': 'local', + }, + ] + + - hosts: cd-newuser-doas-normal tasks: - mitogen_get_stack: