tests: raft of fixes for vanilla Ansible

pull/193/head
David Wilson 7 years ago
parent b8908919b1
commit ef47347cdf

@ -28,7 +28,8 @@
- debug: msg={{raw}}
- name: Verify raw module output.
assert:
that: |
raw.rc == 0 and
raw.stdout == "root\r\n" and
raw.stdout_lines == ["root"]
that:
- raw.rc == 0
# WHY DOES VANILLA ANSIBLE INSERT NEWLINES HERE!?!?!?!?!?!ONE
- raw.stdout in ("\r\nroot\r\n", "root\r\n")
- raw.stdout_lines in (["", "root"], ["root"])

@ -20,4 +20,5 @@
- out.failed
- |
('sudo: no such option: --derps' in out.msg) or
("sudo: unrecognized option `--derps'" in out.module_stderr)
("sudo: unrecognized option `--derps'" in out.module_stderr) or
("sudo: unrecognized option '--derps'" in out.module_stderr)

@ -11,4 +11,4 @@
register: out
- assert:
that: out.mitogen_loaded or not is_mitogen
that: (not not out.mitogen_loaded) == (not not is_mitogen)

@ -11,4 +11,4 @@
register: out
- assert:
that: out.mitogen_loaded or not is_mitogen
that: (not not out.mitogen_loaded) == (not not is_mitogen)

@ -13,6 +13,7 @@
- name: Reset all connections
mitogen_shutdown_all:
when: is_mitogen
- name: Spin up a bunch of interpreters
custom_python_detect_environment:

@ -7,9 +7,9 @@ export MITOGEN_MAX_INTERPRETERS=3
if [ "${ANSIBLE_STRATEGY:0:7}" = "mitogen" ]
then
extra="-e is_mitogen=1"
EXTRA='{"is_mitogen": true}'
else
extra="-e is_mitogen=0"
EXTRA='{"is_mitogen": false}'
fi
exec ansible-playbook $extra "$@"
exec ansible-playbook -e "$EXTRA" "$@"

Loading…
Cancel
Save