Skip to content
Snippets Groups Projects
Commit ac10303a authored by Jörg Sachse's avatar Jörg Sachse
Browse files
parents c82ed697 1d1d9400
No related branches found
No related tags found
No related merge requests found
Pipeline #7554 passed
......@@ -45,4 +45,4 @@ test-job:
- molecule create --scenario-name ${SCENARIO}
- molecule converge --scenario-name ${SCENARIO}
- molecule idempotence --scenario-name ${SCENARIO}
# - molecule verify --scenario-name ${SCENARIO}
- molecule verify --scenario-name ${SCENARIO}
---
# This is an example playbook to execute Ansible tests.
# This is a playbook to execute Ansible tests.
- name: Verify
hosts: all
......@@ -8,3 +8,37 @@
- name: Example assertion
ansible.builtin.assert:
that: true
- name: Run Rosetta-specific tests.
hosts: 'vm-rosapp-mol'
gather_facts: true
tasks:
- name: Get list of installed MediaArea packages.
ansible.builtin.command:
cmd: "dnf list mediaconch mediainfo libmediainfo libzen"
register: mediaconch_repo
changed_when: false
- name: >
Test if the MediaArea packages are installed from their own repository.
ansible.builtin.assert:
that: "'@MediaArea' in mediaconch_repo.stdout"
success_msg: >
The string '@MediaArea' was found in the list of installed MediaArea
packages, so we can assume that at least one of them was installed
from the official MediaArea repository.
fail_msg: >
The string '@MediaArea' was NOT found in the list of installed
MediaArea packages, so they are probably installed from another
source, quite possibly EPEL. These will probably not work without
RHEL 8.
- name: Call mediaconch to see if it runs without errors.
ansible.builtin.command:
cmd: "mediaconch -h"
register: mediaconch_output
changed_when: false
- name: Parse mediaconch output.
ansible.builtin.assert:
that: "'MediaConch Command Line Interface' in mediaconch_output.stdout"
success_msg: MediaConch runs as expected.
fail_msg: MediaConch couldn't be run without errors.
---
- name: add MediaArea repository
ansible.builtin.dnf:
name: "https://mediaarea.net/repo/rpm/releases/repo-MediaArea-1.0-24.noarch.rpm"
name: "https://mediaarea.net/repo/rpm/releases/repo-MediaArea-1.0-25.noarch.rpm"
state: latest
disable_gpg_check: true
tags: [mediaconch]
- name: enable powertools repository (part of EPEL)
community.general.dnf_config_manager:
......
---
- name: install MediaConch
ansible.builtin.yum:
- name: install Ansible prerequisites
ansible.builtin.dnf:
name: [
"mediaconch",
"git",
"libxslt",
]
state: latest
- name: install MediaConch
ansible.builtin.dnf:
name: [
"mediaconch",
"mediainfo",
"libmediainfo",
"libzen",
]
enablerepo: "MediaArea"
disablerepo: "epel"
update_cache: true
state: latest
- name: check MediaConch symlink
ansible.builtin.stat:
......
---
- name: install packages for plugins, TA, analysis
ansible.builtin.yum:
ansible.builtin.dnf:
name: [
'libtiff',
'mediaconch',
'mediainfo',
'perl-Image-ExifTool',
'slubarchiv-xml-catalog',
]
state: latest
state: latest
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment