Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: allow testing to see if secrets are logged
The tasks which handle secrets should be marked `no_log: true`. Data used for secrets should not be logged. In order to test this, you can use the environment variable `SYSTEM_ROLES_PODMAN_PASSWORD` which will use this as the secret data for the test. Then, you can search for this string in the Ansible output/logs. Any hit means secret data is being leaked. ```bash SYSTEM_ROLES_PODMAN_PASSWORD=$(openssl rand -hex 32) SYSTEM_ROLES_PODMAN_PASSWORD="${SYSTEM_ROLES_PODMAN_PASSWORD}" \ tox -e qemu-ansible-core-2.16 -- --image-name centos-9 --log-level debug \ tests/tests_quadlet_basic.yml > output 2>&1 grep "${SYSTEM_ROLES_PODMAN_PASSWORD}" output ``` Signed-off-by: Rich Megginson <[email protected]>
- Loading branch information