Add simple ffmpeg sid role

This commit is contained in:
L3D 2023-02-14 00:23:00 +01:00
parent 00cd3620ea
commit 43516264d7
Signed by: l3d
GPG key ID: CD08445BFF4313D1
7 changed files with 97 additions and 0 deletions

6
roles/ffmpeg/README.md Normal file
View file

@ -0,0 +1,6 @@
ffmpeg
==========
Ansible role to install ffmpeg for debian.
See https://packages.debian.org/search?suite=sid&searchon=names&keywords=ffmpeg

View file

@ -0,0 +1,8 @@
---
- name: Apt update
become: true
ansible.builtin.apt:
update_cache: true
cache_valid_time: 0
when:
- ansible_pkg_mgr == "apt"

View file

@ -0,0 +1,20 @@
---
- name: Create /etc/apt/preferences
become: true
ansible.builtin.template:
src: templates/package_preferences.j2
dest: /etc/apt/preferences
owner: root
group: root
mode: 0644
notify: Apt update
- name: Add eth zurich and default apt for Debian unstable/testing
become: true
ansible.builtin.template:
src: "templates/apt_list.j2"
dest: '/etc/apt/sources.list.d/ffmpeg_debian.list'
mode: 0644
group: root
owner: root
notify: Apt update

View file

@ -0,0 +1,21 @@
---
- name: Package Sources manipulation
ansible.builtin.include_tasks: apt.yml
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
update_cache: true
register: _pre_update_apt_cache
until: _pre_update_apt_cache is succeeded
when:
- ansible_pkg_mgr == "apt"
- name: Install latest ffmpeg from unstable
become: true
ansible.builtin.apt:
name: ['ffmpeg']
default_release: unstable
state: latest
# noqa: ansible-lint package-latest

View file

@ -0,0 +1,18 @@
# Debian mirror der ETH Zürich
# https://debian.ethz.ch/
# https://wiki.debianforum.de/Sources.list
# Testing mirror:
deb https://debian.ethz.ch/debian testing main contrib non-free
deb http://deb.debian.org/debian/ testing main contrib non-free
deb-src http://deb.debian.org/debian/ testing main contrib non-free
deb https://debian.ethz.ch/debian unstable main contrib non-free
deb http://deb.debian.org/debian/ unstable main contrib non-free
deb-src http://deb.debian.org/debian/ unstable main contrib non-free
# Contact for proplems with the mirror:
# https://readme.phys.ethz.ch/services/contact/
# Or #isgphys on irc.phys.ethz.ch

View file

@ -0,0 +1,18 @@
# /etc/apt/preferences
{{ ansible_managed | comment }}
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a={{ ansible_distribution_release }}
Pin-Priority: 699
Package: *
Pin: release a=testing
Pin-Priority: 65
Package: *
Pin: release a=unstable
Pin-Priority: 60

View file

@ -17,3 +17,9 @@
roles: roles:
- {role: do1jlr.admin_base, tags: [default, init, users, accounts, dotfiles]} - {role: do1jlr.admin_base, tags: [default, init, users, accounts, dotfiles]}
- {role: do1jlr.dotfiles, tags: [default, dotfiles]} - {role: do1jlr.dotfiles, tags: [default, dotfiles]}
- name: Video Tasks
hosts: all
roles:
- {role: ffmpeg, tags: ffmpeg}