Add simple ffmpeg sid role
This commit is contained in:
parent
00cd3620ea
commit
43516264d7
7 changed files with 97 additions and 0 deletions
6
roles/ffmpeg/README.md
Normal file
6
roles/ffmpeg/README.md
Normal 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
|
8
roles/ffmpeg/handlers/main.yml
Normal file
8
roles/ffmpeg/handlers/main.yml
Normal 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"
|
20
roles/ffmpeg/tasks/apt.yml
Normal file
20
roles/ffmpeg/tasks/apt.yml
Normal 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
|
21
roles/ffmpeg/tasks/main.yml
Normal file
21
roles/ffmpeg/tasks/main.yml
Normal 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
|
18
roles/ffmpeg/templates/apt_list.j2
Normal file
18
roles/ffmpeg/templates/apt_list.j2
Normal 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
|
18
roles/ffmpeg/templates/package_preferences.j2
Normal file
18
roles/ffmpeg/templates/package_preferences.j2
Normal 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
|
6
site.yml
6
site.yml
|
@ -17,3 +17,9 @@
|
|||
roles:
|
||||
- {role: do1jlr.admin_base, tags: [default, init, users, accounts, dotfiles]}
|
||||
- {role: do1jlr.dotfiles, tags: [default, dotfiles]}
|
||||
|
||||
- name: Video Tasks
|
||||
hosts: all
|
||||
roles:
|
||||
- {role: ffmpeg, tags: ffmpeg}
|
||||
|
||||
|
|
Loading…
Reference in a new issue