31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
---
|
|
|
|
- hosts: all
|
|
environment:
|
|
ANSIBLE_LOG_PATH: "{{ ansible_user_dir }}/zuul-output/logs/ansible-execution.log"
|
|
pre_tasks:
|
|
- name: Set project path fact
|
|
set_fact:
|
|
ansible_project_path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
|
|
|
- name: Set action plugin path fact
|
|
set_fact:
|
|
action_connection_plugins_paths:
|
|
- "{{ ansible_project_path }}/connection"
|
|
tasks:
|
|
- name: Run role test job
|
|
shell: |-
|
|
. {{ ansible_user_dir }}/test-python/bin/activate
|
|
. {{ ansible_project_path }}/ansible-test-env.rc
|
|
pytest --color=no \
|
|
--html={{ ansible_user_dir }}/zuul-output/logs/reports.html \
|
|
--self-contained-html \
|
|
-s \
|
|
--ansible-args='{{ job_ansible_args | default("-v") }}' \
|
|
{{ ansible_project_path }}/tests/test_molecule.py
|
|
args:
|
|
chdir: "{{ ansible_project_path }}"
|
|
executable: /bin/bash
|
|
environment:
|
|
ANSIBLE_CONNECTION_PLUGINS: "{{ action_connection_plugins_paths | join(':') }}"
|