Commit Graph

64 Commits (b822f20007ebe94106b15275962ea4cbbd8a0331)

Author SHA1 Message Date
Alex Willmer b822f20007 ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7
Follwing fixes in Ansible 7-9 for CVE-2023-5764 cating `AnsibleUnsafeBytes` &
`AnsibleUnsafeText` to `bytes()` or `str()` requires special handling. The
handling is Ansible specific, so it shouldn't go in the mitogen package but
rather the ansible_mitogen package.

`ansible_mitogen.utils.unsafe.cast()` is most like `mitogen.utils.cast()`.
During development it began as `ansible_mitogen.utils.unsafe.unwrap_var()`,
closer to an inverse of `ansible.utils.unsafe_procy.wrap_var()`. Future
enhancements may move in this direction.

refs #977, refs #1046

See also
- https://github.com/advisories/GHSA-7j69-qfc3-2fq9
- https://github.com/ansible/ansible/pull/82293
- https://github.com/mitogen-hq/mitogen/wiki/AnsibleUnsafe-notes
3 months ago
Alex Willmer 526422b74b tests: Name tasks
For easier grep, and easier identification in task_profiler summaries.
2 years ago
Alex Willmer db0ffae352 tests: Enable stricter error handling, fix resulting failures 2 years ago
Alex Willmer 216e7c9150 tests: Correct Ansible targets 2 years ago
Alex Willmer f070767dad tests: Use meaningful play names 2 years ago
Klaus Zerwes 2b4f04c554 Revert "Revert "fixed tests for ansible 2.12""
This reverts commit 478f286efb.
3 years ago
Klaus Zerwes 478f286efb Revert "fixed tests for ansible 2.12"
include is deprecated and will be removed in 2.16, so there is some time to fix this left
This reverts commit 2d3970552e.
3 years ago
Klaus Zerwes 2d3970552e fixed tests for ansible 2.12 3 years ago
Alex Willmer 3c58215a91 tests: Tag Ansible tests
This makes it easier to run subsets using ANSIBLE_RUN_TAGS=...
3 years ago
Alex Willmer cfa5888547 tests: Print variables on failure of assert tasks
Fixes #852
3 years ago
Steven Robertson 5a0da02e6c code review changes, using when statements and adding trailing comma 4 years ago
Steven Robertson 24d716aab9 oops, 0664 not 0666 4 years ago
Steven Robertson 355e2ffba2 fix fixup_perms2() test 4 years ago
Steven Robertson 22bc5448b1 default copy perms look like 0644 now based on ansible source and docs 4 years ago
Steven Robertson 8481c50a59 ignore synchronize for now, made ticket 4 years ago
Steven Robertson a7705a3435 add back in ansible tests but don't run synchronize 4 years ago
Steven Robertson b26a636bba remove ansible 2.4-specific test 4 years ago
Steven Robertson fbb92e461f fix fixup_perms2 default file mode 4 years ago
Steven Robertson 8925f8a9d7 disabled another issue with sudo on this test 4 years ago
Steven Robertson ebf628a812 disabling another test 4 years ago
Steven Robertson ecb15cd5f0 disable failing Azure test but that works locally 4 years ago
Steven Robertson 79b8814142 bump macOS test vm to replicate what passes locally 4 years ago
Steven Robertson a7fe74cdba forgot to dump gid info 4 years ago
Steven Robertson 96f896b56c added debugging to figure out what's up with become_user and sudo runas gid not found 4 years ago
Steven Robertson 371ef07683 with statement doesn't exist in early python 4 years ago
Steven Robertson 9eedff97a6 closed fp after writing to temp files 4 years ago
David Wilson 61b651bdd2 issue #587: workaround for ansible/ansible#56629 5 years ago
David Wilson 6309774be2 issue #554: fix Ansible 2.4 compatibility 5 years ago
David Wilson f36b4b47bf issue #554: don't rely on tmp_path autoremoval in test.
Ansible doesn't do this, so we shouldn't either.
5 years ago
David Wilson 7743e57ff3 issue #554: track and remove multiple make_tmp_path() calls. 5 years ago
David Wilson 9df314f9c5 issue #499: another totally moronic implementation difference 5 years ago
David Wilson c61498202e issue #477: use assert_equal for nicer debug. 5 years ago
David Wilson 7d1b0e0807 issue #477: Ansible 2.3 did not support gather_facts min subset. 5 years ago
David Wilson c1a4597e32 issue #477: tests: use Ansible 2.3-compatible include rather than import
This will break with Ansible 2.8. Probably going to end up with a regex
hack for CI.
6 years ago
David Wilson bd82fa1986 issue #426: fix low_level_execute_command.yml breakage. 6 years ago
David Wilson a6e6fd14be issue #426: more 2->3 test fixes. 6 years ago
David Wilson 67f710fd9b issue #426: use delegate_to in fixup_perms2 and copy.yml 6 years ago
David Wilson bef4b0c962 tests: fix copy.yml title 6 years ago
David Wilson f87553b165 tests: must set ansible_become_pass in synchronize.yml. 6 years ago
David Wilson fd5066d671 tests: teach various tests to cleanup /tmp when they're done. 6 years ago
David Wilson 1b17aa1d1a ansible: fix temp cleanup regression and add test; closes #397. 6 years ago
David Wilson 2eb3ea78d6 tests: remove a bunch of stray debug 6 years ago
David Wilson 5521945bd2 ansible: temporary files take 5. 6 years ago
David Wilson 638e473ff1 tests: hacksmash synchronize test to work
Avoid password typing idiocy.
6 years ago
David Wilson 638b196a45 ansible: fix put_file() for large temporary files.
Reverts 49736b3a, large file copies can't avoid the RTT.

The parent stack must be blocked while FileService progresses, as unlike
the small file path, it does not make a snapshot of the (possibly
temporary) file passed by the action plug-in. So we need to keep that
file alive while the service runs.

Add a new integration test and a new soak test to cover both.
6 years ago
David Wilson 001b63074c tests: fix another typo. 6 years ago
David Wilson d5524178bf tests: fix bonehead syntax error. 6 years ago
David Wilson 65f03e03f5 tests: remote_tmp test fixes. 6 years ago
David Wilson 72fa129f8a tests: fix clash when localhost is test-target 6 years ago
David Wilson 90c2ed03d0 ansible: fix synchronize module
Broken by recent connection delegation fixes.
6 years ago