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
8 months 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
d9b8d50d4e
Fix ansible.__version__ comparisons with multi-digit components
...
Ansible 2.8 is older than Ansible 2.10, but `'2.8' < '2.10' == False`
3 years ago
Steven Robertson
e30e84334e
remove synchronize fail test for azure
4 years ago
Steven Robertson
139b9560bc
print didn't work because verbosity, throw valueerror to see
4 years ago
Steven Robertson
9bd35adcfb
more debugging, synchronize is being weird on azure
4 years ago
Steven Robertson
ff8a276186
turn off failing Ansible-only tests for now, also raising errors to see what Azure is gonna do with collections
4 years ago
Steven Robertson
41a13ebce2
hopefully this also fails the same way
4 years ago
Steven Robertson
5aedb5f157
add missing collections 🤦
4 years ago
Steven Robertson
9857dfea5c
verify collection is working as expected
4 years ago
Steven Robertson
a40c28d93f
can't replicate but think it's because synchronize is now a collection
4 years ago
Steven Robertson
49dd8eee1a
figure out what synchronize is now
4 years ago
Steven Robertson
c6d42212dd
add some debugging info, was able to run the failed synchronize test locally just fine using test framework, not sure what's going on
4 years ago
Steven Robertson
f91cbf4d00
test cleanup and trying to replicate synchronize fails
4 years ago
Steven Robertson
f994807d74
ansible 2.10 renamed ping module to reflect legacy builtin collection
4 years ago
Steven Robertson
03438271bb
able to remove the hack on ActionBase after all
4 years ago
Steven Robertson
583f540889
added comments
4 years ago
Steven Robertson
ddc1eebec8
able to load collection but the mitogen master proc was unable to serve it
5 years ago
Steven Robertson
e99d63f4fc
able to load collections but they don't do anything because no actionmodulemixin, need to tweak how this works
5 years ago
Steven Robertson
acde13f9d6
handles a 'wait_for_connection' call right after a task caused a shutdown
5 years ago
Steven Robertson
5bf327649f
add missing / to python paths
5 years ago
Steven Robertson
7411057ba8
adding in python3 as a possible_pythons option for rhel8
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
ee310c1a68
remove_internal_keys returns None, so need different way to check fallback
5 years ago
Steven Robertson
722cf0ea8d
handle ansible 2.3.3 remove_internal_keys
5 years ago
Steven Robertson
ba350aa6cf
assigned interpreter vars to the wrong class
5 years ago
Steven Robertson
d74da84f62
the clean module was added later
5 years ago
Steven Robertson
ff2fa60184
fixed typo
5 years ago
Steven Robertson
0b57332d75
all test cases for ansible_python_interpreter on OSX pass now
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
a6d2b2cd90
doesn't error when declaring 'ansible_python_interpreter: auto' but fact isn't being cached
5 years ago
Steven Robertson
d64adb15d7
reverted autolinted code
5 years ago
Steven Robertson
e8f3154cab
Merge branch 'master' into complexAnsiblePythonInterpreterArg
5 years ago
David Wilson
d6329f3446
Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415
5 years ago
Steven Robertson
4669c8774f
handles templating ansible_python_interpreter values
5 years ago
David Wilson
8dfb3966df
issue #558 , #582 : preserve remote tmpdir if caller did not supply one
...
The undocumented 'tmp' parameter controls whether _execute_module()
would delete anything on 2.3, so mimic that. This means
_execute_remove_stat() calls will not blow away the temp directory,
which broke the unarchive plugin.
5 years ago
David Wilson
c80fddd487
[linear2]: merge fallout flaggged by LGTM
5 years ago
David Wilson
6309774be2
issue #554 : fix Ansible 2.4 compatibility
6 years ago
David Wilson
7743e57ff3
issue #554 : track and remove multiple make_tmp_path() calls.
6 years ago
David Wilson
1f77d24bec
Update copyright year everywhere.
6 years ago
David Wilson
97f3cfe4f4
issue #477 : target.file_exists() wrapper.
...
os.path.exists physical module name varies across major Python versions.
6 years ago
David Wilson
bcc7bb7128
issue #61 : unused import (reported by LGTM)
6 years ago
David Wilson
9401c34f64
issue #461 : Ansible 2.3 did not have _load_name.
6 years ago
David Wilson
1b17aa1d1a
ansible: fix temp cleanup regression and add test; closes #397 .
6 years ago
David Wilson
5521945bd2
ansible: temporary files take 5.
6 years ago
David Wilson
9ff34afafe
ansible: fix regression.
6 years ago
David Wilson
e241081cae
ansible: stop sharing target temp_dir in runner.
...
This cannot work with delegate_to, since delegate_to permits multiple
concurrent tasks to be executing on the same target.
6 years ago
David Wilson
43d9815f6d
ansible: use CallChain everywhere.
...
This replaces the 'dump to logger' behaviour of pipelined calls from
before with a call chain that returns any exception on next synchronized
call.
6 years ago
David Wilson
084c0ac065
ansible: avoid roundtrip in copy action due to fixup_perms2().
...
On top of existing temporary files work, this reduces the number of
roundtrips required for "copy" and "template" actions from 6 to 3.
6 years ago