Commit Graph

52 Commits (f384fc33d06b1abb66d316943ef9bb7e7cd3d162)

Author SHA1 Message Date
Alex Willmer 77a01ff8d6 ansible_mitogen: Support templated SSH port
fixes #978
3 weeks ago
Joshua M. Keyes 6053e1b5cf ansible_mitogen: Handle templated ansible_ssh_user. 3 weeks ago
Alex Willmer 1773c9aba6 trivia: Fix trailing whitespace 3 weeks ago
Alex Willmer 551690ee1d ansible_mitogen: Handle templated connection passwords and ansible_ssh_password
This switches `ansible_mitogen.transport_config.PlayContextSpec.password()` to
Ansible's plugin option framework. As a result
- The relatively recent `ansible_ssh_password` variable is now respected.
- The SSH connection password can be templated and specified as a play
  variable. Task variables will probably also work, but testing was blocked
  by #1132.

There is a chance this change will cause a regression in another connection
plugin (e.g. mitogen_docker), but nothing turned up in the test suite.
I intend ot migrate other connection configuration to
`ansible_mitogen.transport_config.PlayContextSpec._connect_option()`, the next
candidate is the remote port.

fixes #1106
4 weeks ago
michael.dsilva d0993e9918 allow ansible_ssh_password as it is documented as valid in current ansible documentation
Co-authored-by: Alex Willmer <alex@moreati.org.uk>
1 month ago
Alex Willmer 0a908d76da ansible_mitogen: Remove fallback imports for Ansible < 2.10 1 month ago
root be288ad398 patch #509 : ansible_ssh_common_args issues 2 months ago
Philippe Kueck ec05e542b4
Fix 'ansible_host_key_checking' and 'ansible_ssh_host_key_checking' for
adding new hosts to the inventory using 'add_hosts'

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
6 months ago
Alex Willmer d5e9186289 ansible_mitogen: Fix --ask-become-pass, add test coverage
Previously f1503874de fixed the priority of
ansible_become_pass over ansible_become_password, but broke --ask-become-pass.
Fixes #952.
7 months ago
InsanePrawn 317a2abd57 ansible_mitogen: correct typo in MitogenViaSpec.mitogen_lxc_path()
self.host_vars -> self._host_vars
2 years ago
Alex Willmer f1503874de ansible_mitogen: Correct ansible_become_pass/ansible_become_password precendence
Until Ansible 2.9 it looks like ansible_become_password had higher priority.
From Ansible 2.10 ansible_become_pass has higher priority [1]. Mitogen was not
respecting this.

I may need to rework this further, instatiating the become plugin may have
slowed down execution.

[1] Based on testing with

```
[ubuntus]
become-pass-pass ansible_become_pass=1234
become-pass-password ansible_become_password=1234
become-pass-both ansible_become_password=wrong ansible_become_pass=1234

[ubuntus:vars]
ansible_host=ubuntu2004.local
ansible_user=ubuntu
```
```
- hosts: ubuntus
  gather_facts: false
  become: true
  tasks:
    - ping:
```
2 years ago
Alex Willmer 31b3a4eb4a ansible_mitogen: Standardise __future__ imports to match Ansible
Some modules additionally enable unicode_literals (which Ansible doesn't do).
I've chosen not to change that, for now.
3 years ago
Alex Willmer 96e20a09d6 ansible_mitogen: Add podman connection plugin 3 years ago
Alex Willmer c61c063b4f Support for Ansible 3 & 4
fixes #834

Co-authored-by: Claude Becker (@upekkha)
Co-authored-by: Dolph Mathews (@dolph)
3 years ago
Steven Robertson 33e7d0804f fixed tests, and removed the action hack code 5 years ago
Steven Robertson 89d87445c8 able to pass tests running interpreter detection in rhel8 container 5 years ago
Steven Robertson 7d6d76e444 trying to get docker rhel8 working on a Mac host 5 years ago
Steven Robertson 5e0fb902b2 fix lambda args for fallback 5 years ago
Steven Robertson 91785f8862 fix another bad import 5 years ago
Steven Robertson aa0ad5ce8f accidentally broke discovery 5 years ago
Steven Robertson f10fb7d486 more test cases pass 5 years ago
Steven Robertson e3eebb98d0 ImportError instead of newer ModuleNotFoundError 5 years ago
Steven Robertson 2d3d9cb659 fallback to old-style python interpreter default if running ansible < 2.8.0 5 years ago
Steven Robertson 8630f6190c fixed propagating discovered interpreter to future tasks; sys.executable still wrong though 5 years ago
Steven Robertson af1e22d4e1 able to propagate ansible_python_interpreter fact but still doesn't save between task runs 5 years ago
Steven Robertson 119e1c24aa code cleanup 5 years ago
Steven Robertson cec692dc17 faking pipelining so discover_interpreter can successfully exit 5 years ago
Steven Robertson a6d2b2cd90 doesn't error when declaring 'ansible_python_interpreter: auto' but fact isn't being cached 5 years ago
Steven Robertson 806651e112 working on ansible discovery; need to fix passing ActionModuleMixin reference still 5 years ago
Steven Robertson d64adb15d7 reverted autolinted code 5 years ago
Steven Robertson cc11864b7d code cleanup 5 years ago
Steven Robertson 24b170311a able to get to 'sudo: source not found' after preventing escape of && so python connects 5 years ago
Jordan Webb 1a02a86331
Add buildah transport 5 years ago
David Wilson 3620fce071 issue #593: expose configurables for SSH keepalive and increase the default 5 years ago
David Wilson 92b4724010 issue #587: consistent become_exe() behaviour for older Ansibles. 6 years ago
David Wilson f35194fe0f issue #587: mitogen_doas should not become_exe for doas_path
Looks like this has always been wrong - when used as a connection
method, PlayContext.become_method/become_exe may hold totally unrelated
data.
6 years ago
David Wilson c1c8d5c31e issue #587: 2.8 PlayContext lacks sudo_flags attribute.
This is a huge bodge.
6 years ago
David Wilson f30a4c05c8 issue #581: expose mitogen_mask_remote_name variable. 6 years ago
David Wilson 7fd0d34910 tests/ansible: Spec.port() test & mitogen_via= fix.
ansible_ssh_port was not respected.
6 years ago
David Wilson 1f77d24bec Update copyright year everywhere. 6 years ago
David Wilson b5b23e8f3d tests/ansible: Spec.become_pass() test. 6 years ago
David Wilson 8ae6ca1d5b tests/ansible: Spec.become_method() test & mitogen_via= fix.
ansible_become_method hostvar was not taken into account.
6 years ago
David Wilson d1cadf8ac8 tests/ansible: Spec.password() test, document interactive pw limitation. 6 years ago
David Wilson 21ad299d7b tests/ansible: Spec.remote_user() test & mitogen_via= fix.
ansible_ssh_user precedence was incorrect.
6 years ago
David Wilson 748f5f675d tests/ansible: Spec.remote_addr() test & mitogen_via= fix.
ansible_ssh_host was not respected.
6 years ago
David Wilson e1df98168c issue #536: add mitogen_via= tests too. 6 years ago
David Wilson 001e3fee86 issue #536: restore correct Python interpreter selection behaviour. 6 years ago
David Wilson b499fbe29b ansible: add mitogen_ssh_compression variable. 6 years ago
David Wilson e7fe95af88 issue #477: fix sudo_args selection. 6 years ago
David Wilson 0175052099 issue #477: fix source of become_flags on 2.3. 6 years ago