Merge remote-tracking branch 'origin/dmw'

* origin/dmw:
  docs: update Changelog; closes #548.
  issue #548: always treat transport=smart as 'ssh' for mitogen_via=.
pull/564/head
David Wilson 6 years ago
commit ebc53283db

@ -356,6 +356,7 @@ CONNECTION_METHOD = {
'machinectl': _connect_machinectl, 'machinectl': _connect_machinectl,
'setns': _connect_setns, 'setns': _connect_setns,
'ssh': _connect_ssh, 'ssh': _connect_ssh,
'smart': _connect_ssh, # issue #548.
'su': _connect_su, 'su': _connect_su,
'sudo': _connect_sudo, 'sudo': _connect_sudo,
'doas': _connect_doas, 'doas': _connect_doas,

@ -144,6 +144,9 @@ Fixes
64-bit integer to be assigned to a 32-bit field on ARM 32-bit targets, 64-bit integer to be assigned to a 32-bit field on ARM 32-bit targets,
causing runs to fail. causing runs to fail.
* `#548 <https://github.com/dw/mitogen/issues/548>`_: `mitogen_via=` could fail
when the selected transport was set to ``smart``.
Core Library Core Library
~~~~~~~~~~~~ ~~~~~~~~~~~~
@ -174,7 +177,9 @@ Thanks!
Mitogen would not be possible without the support of users. A huge thanks for Mitogen would not be possible without the support of users. A huge thanks for
bug reports, testing, features and fixes in this release contributed by bug reports, testing, features and fixes in this release contributed by
`Fabian Arrotin <https://github.com/arrfab>`_, and `Fabian Arrotin <https://github.com/arrfab>`_, and
`Petr Enkov <https://github.com/enkov>`_. `Petr Enkov <https://github.com/enkov>`_, and
`@elbunda <https://github.com/elbunda>`_.
v0.2.5 (2019-02-14) v0.2.5 (2019-02-14)

@ -5,6 +5,7 @@
# tansport() # tansport()
tc-transport-unset tc-transport-unset
tc-transport-local ansible_connection=local tc-transport-local ansible_connection=local
tc-transport-smart ansible_connection=smart
# python_path() # python_path()
tc-python-path-unset tc-python-path-unset

@ -8,3 +8,4 @@
- include: remote_addr.yml - include: remote_addr.yml
- include: remote_user.yml - include: remote_user.yml
- include: transport.yml - include: transport.yml
- include: transport__smart.yml

@ -0,0 +1,49 @@
# issue #548
# Each case is followed by mitogen_via= case to test hostvars method.
# When no ansible_connection= is set, transport comes via ansible.cfg ("smart"
# is parsed away to either paramiko or ssh).
- name: integration/transport_config/transport.yml
hosts: tc-transport-smart
tasks:
- include: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out}
- assert_equal:
left: out.result[0].method
right: "ssh"
- hosts: tc-transport-local
vars: {mitogen_via: tc-transport-smart}
tasks:
- include: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out}
- assert_equal:
left: out.result[0].method
right: "ssh"
- assert_equal:
left: out.result[1].method
right: "local"
# ansible_connection=local
- hosts: tc-transport-local
tasks:
- include: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out}
- assert_equal:
left: out.result[0].method
right: "local"
- hosts: tc-transport-smart
vars: {mitogen_via: tc-transport-local}
tasks:
- include: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out}
- assert_equal:
left: out.result[0].method
right: "local"
- assert_equal:
left: out.result[1].method
right: "ssh"
Loading…
Cancel
Save