Commit Graph

42 Commits

Author SHA1 Message Date
David Wilson d3712bbacb ansible: redirect logging into display 'framework'. closes #111 2018-03-08 05:01:57 +05:45
David Wilson d89b214164 issue #109: do exactly what Ansible does
Could it be that some empty dict magically gets populated from somewhere
invisible?
2018-03-07 20:04:05 +05:45
David Wilson 49eef4c0ad ansible: correct sys.path fixup. 2018-03-02 19:45:24 +05:45
David Wilson a39ab8fa54 ansible: basic support for ssh_args 2018-03-02 19:35:10 +05:45
David Wilson 6bc0fd494a ansible: Support ansible_ssh_private_key_file 2018-03-02 18:41:48 +05:45
David Wilson 3beddf39be ansible: limited support for become_flags, more docs. 2018-03-01 21:08:57 +05:45
David Wilson 3a3356e52e ansible: teach ActionModule to disappear for non-Mitogen Connections
Closes #103.
2018-03-01 00:49:43 +05:45
David Wilson e77c8055fb ansible: restructure package to avoid yet more madness
Ansible's PluginLoader makes up bullshit when it imports a module
(mostly because it has to make up something), therefore we ended up with
duplicate copies of ansible_mitogen loaded: one under
ansible.plugins.*.mitogen, and one under the canonical namespace.

Which broke isinstance().
2018-03-01 00:44:17 +05:45
David Wilson 1e20887416 ansible: mixins.py docstrings. 2018-02-28 23:37:32 +05:45
David Wilson 950e9f3364 ansible: support environment: too. 2018-02-28 01:42:37 +05:45
David Wilson 7785aa4ff8 ansible: Support many more common playbook variables. 2018-02-28 00:07:11 +05:45
David Wilson b9433d9969 ansible: one more cast() call.
Need a more general solution to littering the code with this crap.
2018-02-28 00:04:25 +05:45
David Wilson d0b58d176b ansible: initial support for async jobs
Running in a thread to begin with, but this must change.
2018-02-27 21:01:05 +05:45
David Wilson 220a41a2b3 tests: import ansible_helpers_test. 2018-02-27 19:23:32 +05:45
David Wilson 4807abadc4 ansible: fix bug in apply_mode_spec(). 2018-02-27 17:56:25 +05:45
David Wilson 277b8e4172 ansible: fix some flake8 errors
* Unused imports
* Undefined names in helpers.py
* Copyright header wrapping
2018-02-27 17:28:32 +05:45
David Wilson f81fe7eb32 ansible: inverted sense of execute paramter 2018-02-27 16:59:36 +05:45
David Wilson 6442aa47d1 ansible: fix become:true with sudo:true 2018-02-27 15:41:16 +05:45
David Wilson f649318707 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.
2018-02-27 15:17:37 +05:45
David Wilson 97ff132efd 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.
2018-02-27 13:39:40 +05:45
David Wilson 102f5f9f33 ansible: correct temp file cleanup for template action. 2018-02-18 14:06:08 +05:45
David Wilson 2e3ca8dbfe ansible: don't enable_debug_logging() for sudo 2018-02-18 13:52:44 +05:45
David Wilson 9e70a32567 ansible: log call timings 2018-02-18 13:37:20 +05:45
David Wilson fa0eb21120 ansible: Ansible 2.4 compatibility. 2018-02-18 13:02:32 +05:45
David Wilson 6a7930ae48 ansible: gracefully shut down the service thread at exit. 2018-02-18 11:34:13 +05:45
David Wilson 87db049669 ansible: delete utils.py and promote cast() to mitogen.utils 2018-02-17 17:29:05 +05:45
David Wilson 9d15d1fce8 ansible: document Strategy's implementation 2018-02-17 16:46:18 +05:45
David Wilson 7c1cc064a4 ansible: migrate logging variables into utils. 2018-02-17 16:18:03 +05:45
David Wilson 038cd02136 ansible: document the connection class. 2018-02-17 16:01:05 +05:45
David Wilson 4bd40bd257 ansible: remove old action subdirectory. 2018-02-17 15:34:29 +05:45
David Wilson 41b27d969c ansible: clean up, structure and document strategy module. 2018-02-17 15:30:01 +05:45
David Wilson c175fbfaf7 ansible: handle local connections and synchronize module too. 2018-02-16 10:13:47 +05:45
David Wilson 7a56ea46ed ansible: fix syntax error 2018-02-16 08:19:23 +05:45
David Wilson 698996dc27 ansible: support local connections too 2018-02-16 07:39:15 +05:45
David Wilson 9219e9a125 ansible: support class_only=True in wrapped loader 2018-02-15 21:04:45 +05:45
David Wilson 5d9363be79 ansible: blacklist everything except our own namespaces
Farewell, pointless roundtrips, we hardly knew ye.
2018-02-15 20:13:26 +05:45
David Wilson d0fbcc0f48 ansible: generalized action module wrapping. 2018-02-15 15:30:19 +05:45
David Wilson 371a259a5e ansible: remove hard-wired UNIX socket path. 2018-02-15 04:55:56 +05:45
David Wilson 8121530144 core: replace Queue with Latch
On Python 2.x, operations on pthread objects with a timeout set actually
cause internal polling. When polling fails to yield a positive result,
it quickly backs off to a 50ms loop, which results in a huge amount of
latency throughout.

Instead, give up using Queue.Queue.get(timeout=...) and replace it with
the UNIX self-pipe trick. Knocks another 45% off my.yml in the Ansible
examples directory against a local VM.

This has the potential to burn a *lot* of file descriptors, but hell,
it's not the 1940s any more, RAM is all but infinite. I can live with
that.

This gets things down to around 75ms per playbook step, still hunting
for additional sources of latency.
2018-02-15 02:06:21 +05:45
David Wilson d3e79fc240 ansible: support become:True and become_user 2018-02-15 00:27:23 +05:45
David Wilson 3a96389d08 ansible: automatically configure connection plug-in. 2018-02-15 00:14:38 +05:45
David Wilson 8598ff07b3 ansible: restructure to avoid intermediate imports 2018-02-14 22:30:35 +05:45