34 lines
771 B
YAML
34 lines
771 B
YAML
|
- hosts: localhost
|
||
|
vars:
|
||
|
config:
|
||
|
packagename: enchant
|
||
|
testfilename: test_pyenchant.py
|
||
|
logfilepath: /tmp/test.log
|
||
|
artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
||
|
|
||
|
tags:
|
||
|
- classic
|
||
|
|
||
|
remote_user: root
|
||
|
|
||
|
tasks:
|
||
|
- name: Install required package
|
||
|
dnf:
|
||
|
name:
|
||
|
- python3
|
||
|
- langpacks-en
|
||
|
- "python3-{{ config.packagename }}"
|
||
|
|
||
|
- name: Test Execution
|
||
|
block:
|
||
|
- name: Execute the tests
|
||
|
command: python3 {{ config.testfilename }} "{{ config.logfilepath }}"
|
||
|
|
||
|
always:
|
||
|
- name: Pull out the artifacts
|
||
|
fetch:
|
||
|
dest: "{{ config.artifacts }}/"
|
||
|
src: "{{ item }}"
|
||
|
flat: yes
|
||
|
with_items:
|
||
|
- "{{ config.logfilepath }}"
|