mitogen/tests/image_prep
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
2024-04-04 09:11:23 +01:00
..
group_vars tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
host_vars tests: Add centos 8; debian 10, 11; ubuntu 16.04, 18.04, 20.04 test images 2021-02-21 20:52:58 +00:00
README.md tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
_container_create.yml tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
_container_finalize.yml tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
_container_setup.yml ansible_mitogen: Handle AnsibleUnsafeText et al in Ansible >= 7 2024-04-04 09:11:23 +01:00
_user_accounts.yml tests: Cleanup ansible-lint errors & warnings in user creation playbook 2024-03-04 14:04:28 +00:00
ansible.cfg tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
hosts.ini tests: Add centos 8; debian 10, 11; ubuntu 16.04, 18.04, 20.04 test images 2021-02-21 20:52:58 +00:00
py24-build.sh issue #477: import updated Python build scripts 2019-01-27 00:37:13 +00:00
py24.sh issue #477: import updated Python build scripts 2019-01-27 00:37:13 +00:00
setup.yml tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00
tox.ini tests: Rebuild Docker containers 2021-02-21 20:23:41 +00:00

README.md

image_prep

This directory contains Ansible playbooks for building the Docker containers used for testing, or for setting up an OS X laptop so the tests can (mostly) run locally.

The Docker config is more heavily jinxed to trigger adverse conditions in the code, the OS X config just has the user accounts.

See ../README.md for a (mostly) description of the accounts created.

Building the containers

No single version of Ansible supports every Linux distribution that we target. To workaround this Tox is used, to install and run multiple versions of Ansible, in Python virtualenvs.

tox

Preparing an OS X box

WARNING: this creates a ton of accounts with preconfigured passwords. It is generally impossible to restrict remote access to these, so your only option is to disable remote login and sharing.

ansible-playbook -b -c local -i localhost, -l localhost setup.yml