Fix ansible-runner integration tests.

pull/77942/head
Matt Clay 3 years ago
parent f3c684564c
commit bd849b3076

@ -1,5 +0,0 @@
psutil < 5.7.0 # Greater than this version breaks on older pip
pexpect >= 4.5, <= 4.8.0
python-daemon <= 2.2.4
pyyaml < 5.1 ; python_version < '2.7' # pyyaml 5.1 and later require python 2.7 or later
six <= 1.14.0

@ -2,4 +2,6 @@
set -eux
source virtualenv.sh
ANSIBLE_ROLES_PATH=../ ansible-playbook test.yml -i inventory "$@"

@ -2,4 +2,3 @@
- include_tasks: setup.yml
- include_tasks: adhoc_example1.yml
- include_tasks: playbook_example1.yml
when: ansible_distribution in ('RedHat', 'CentOS') and ansible_distribution_major_version == '7'

@ -6,9 +6,16 @@
# work around for ansible-runner showing ansible warnings on stdout
set_fact:
pbexec_json: "{{ script.stdout | parse_json }}"
expected_events:
- playbook_on_start
- playbook_on_play_start
- playbook_on_task_start
- runner_on_start
- runner_on_ok
- playbook_on_stats
- assert:
that:
- "pbexec_json.rc == 0"
- "pbexec_json.events|length == 7"
- "pbexec_json.events == expected_events"
- "'localhost' in pbexec_json.stats.ok"

@ -1,6 +1,4 @@
- name: Install ansible-runner
pip:
name: ansible-runner
version: 1.4.6
extra_args:
-c {{ role_path }}/files/constraints.txt
version: 2.2.0

Loading…
Cancel
Save