-
Jörg Sachse authoredJörg Sachse authored
install_mediaconch.yml 2.71 KiB
---
- name: install Ansible prerequisites
ansible.builtin.dnf:
name: [
"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:
path: "/operational_shared/software/mediaconch"
register: mediaconch_stat
- name: set MediaConch symlink
ansible.builtin.file:
src: "/usr/bin/mediaconch"
dest: "/operational_shared/software/mediaconch"
state: link
force: true
when: ( not mediaconch_stat.stat.exists ) or
( not mediaconch_stat.stat.islnk ) or
( mediaconch_stat.stat.isreg )
- name: remove existing MediaConch-Profile repo directory (otherwise, we can't clone it in the next task -.-)
ansible.builtin.file:
path: "/tmp/mediaconch-profile/"
state: absent
changed_when: false # there's no other way to get this task idempotent
- name: checkout MediaConch-Profile repo
ansible.builtin.git:
repo: "https://git.slub-dresden.de/digital-preservation/mediaconch-profile.git"
dest: "/tmp/mediaconch-profile/"
register: mc_profile_repo_cloned
changed_when: false # there's no other way to get this task idempotent
- name: compile MediaConch profile
ansible.builtin.command:
cmd: "bash ./build_all.sh"
chdir: "/tmp/mediaconch-profile/"
when: mc_profile_repo_cloned.before != mc_profile_repo_cloned.after
register: mc_profile_repo_built
changed_when: false # there's no other way to get this task idempotent
- name: deploy MediaConch profile to Rosetta
ansible.builtin.copy:
src: "/tmp/mediaconch-profile/build/SLUB_mediaconch_policy_all.xml"
dest: "/operational_shared/software/SLUB_mediaconch_policy_all.xml"
remote_src: true
owner: "{{ vault_rosetta_user }}"
group: "{{ vault_rosetta_group }}"
mode: "0644"
- name: create MediaConch etc directory
ansible.builtin.file:
path: "/etc/mediaconch/"