Commit Graph

37 Commits (a4ddef25a1a585349079e7171bdaa7686272e90a)

Author SHA1 Message Date
David Wilson ddf28987a0 master: split Select() into new module to reduce wire size.
service.py currently imports master.py(+parent.py) just to get Select().
7 years ago
David Wilson f737ff5276 ansible: stop passing through remote_tmp variable
Ansiballz does not use remote_tmp so neither should we, per #239.
7 years ago
David Wilson dafe12b315 ansible: fix AnsibleUnicode crash when processing "~username". 7 years ago
David Wilson 71057c78f9 ansible: rename helpers.py to target.py, to reflect its purpose 7 years ago
David Wilson 4a823c7a27 issue #164: missing cast() for _remote_file_exists(). 7 years ago
David Wilson d503956493 ansible: Remove duplicate casts already done in Connection 7 years ago
David Wilson 6aeb4e9f05 issue #164: precisely emulate Ansible's stdio behaviour.
* Use identical logic to select when stdout/stderr are merged, so
  'stdout', 'stdout_lines', 'stderr', 'stderr_lines' contain the same
  output before/after the extension.

* When stdout/stderr are merged, synthesize carriage returns just like
  the TTY layer.

* Mimic the SSH connection multiplexing message on stderr. Not really
  for user code, but so compare_output_test.sh needs fewer fixups.
7 years ago
David Wilson 26cc0f2724 issue #164: fix remote_tmp handling on <2.5 7 years ago
David Wilson e0381606af Ensure remote_tmp is respected everywhere.
Logic is still somewhat different from Ansible: we don't have to care
about sudo/non-sudo cases, etc.
7 years ago
David Wilson e5723e4f5f ansible: fix _make_tmp_path() regression on 2.3.x.
Due to issue #177.
7 years ago
David Wilson 16b64392e2 issue #106: support WANT_JSON modules. 7 years ago
David Wilson df6daaf3c4 issue #106: working/semantically compatible binary support. 7 years ago
David Wilson 43e4f5009a issue #106: remove 2 needless Invocation attributes. 7 years ago
David Wilson c891ab078a issue #106: working old-style native module execution
Still abusing Python import mechanism, but one big step closer to
eliminating that.
7 years ago
David Wilson 98c15942f7 issue #177: fix bizarre syntax error in last commit. 7 years ago
David Wilson cf25437019 issue #177: populate Shell.tempdir global on creating a tempdir.
It looks a lot like multiple calls to _make_tmp_path() will result in
multiple temporary directories on the remote machine, only the last of
which will be cleaned up.

We must be bug-for-bug compatible for now, so ignore the problem in the
meantime.
7 years ago
David Wilson 6eed3aa1fa issue #177: fetch and cache HOME value during connection setup.
This ensures only 1 roundtrip is required for every invocation of
_remote_expand_user().
7 years ago
David Wilson 037bed895b issue #110: _transfer_data() must handle dicts and Unicode(!) 7 years ago
David Wilson d34025fae9 ansible: _transfer_data() must return remote_path.
Fixes DebOps bug.
7 years ago
David Wilson a9db27d424 ansible: instrument every ActionMixin override. 7 years ago
David Wilson 9b7991cd45 issue #118: log exceptions for emulated commands, fix AttributeError in helpers.py
Turns out Ansible can't be trusted to actually check the result
dictionary everywhere it expects one, so put the real exception text
into -vvv output too.
7 years ago
David Wilson b63af1de85 ansible: implement _transfer_data for <2.4 template action 7 years ago
David Wilson b527628b17 issue #109: do exactly what Ansible does
Could it be that some empty dict magically gets populated from somewhere
invisible?
7 years ago
David Wilson e0382ab2db ansible: teach ActionModule to disappear for non-Mitogen Connections
Closes #103.
7 years ago
David Wilson 734fb75203 ansible: mixins.py docstrings. 7 years ago
David Wilson 7080751f13 ansible: support environment: too. 7 years ago
David Wilson 7cf2edc3a8 ansible: Support many more common playbook variables. 7 years ago
David Wilson 3183dd4147 ansible: initial support for async jobs
Running in a thread to begin with, but this must change.
7 years ago
David Wilson ff617824a1 ansible: fix some flake8 errors
* Unused imports
* Undefined names in helpers.py
* Copyright header wrapping
7 years ago
David Wilson 76e739a0ba ansible: inverted sense of execute paramter 7 years ago
David Wilson 83f2862431 ansible: _remote_chmod() / _fixup_perms2() can be called sometimes.
It's used at least by the copy module, even though the result is still
mostly a no-op. _remote_chmod() doesn't accept octal mode, it accepts
symbolic mode. So implement a symbolic parser in helpers.py.
7 years ago
David Wilson f3315fc172 ansible: better emulate _low_level_execute_command()
Still needs a ton of work to emulate argument handling, shell selection,
and output emulation in every case. Unsurprisingly, Ansible documents
none of this.
7 years ago
David Wilson cccfebec74 ansible: correct temp file cleanup for template action. 7 years ago
David Wilson 1e9fd63343 ansible: Ansible 2.4 compatibility. 7 years ago
David Wilson 91116810a1 ansible: delete utils.py and promote cast() to mitogen.utils 7 years ago
David Wilson 57894b18e0 ansible: support class_only=True in wrapped loader 7 years ago
David Wilson 331f77ee2b ansible: generalized action module wrapping. 7 years ago