- use generic media_dirs including vdr recdir, loop over them to create directories, configure samba, nfs, etc. - add role to install an configure nfs-kernel-server - cleanup roles - add custom fact modules
101 lines
2.0 KiB
YAML
101 lines
2.0 KiB
YAML
---
|
|
|
|
# This playbook sets up the basic packages an directories for a yaVDR installation
|
|
# file: roles/yavdr-common/tasks/main.yml
|
|
|
|
- name: apt | prevent automatic installation of recommended packages
|
|
template:
|
|
src: templates/90-norecommends.j2
|
|
dest: /etc/apt/apt.conf.d/90norecommends
|
|
|
|
- name: use bash instead of dash
|
|
shell: |
|
|
echo "set dash/sh false" | debconf-communicate
|
|
dpkg-reconfigure -f noninteractive dash
|
|
|
|
- name: disable release-upgrade notifications
|
|
lineinfile:
|
|
dest: /etc/update-manager/release-upgrades
|
|
backrefs: yes
|
|
state: present
|
|
regexp: '^(Prompt=).*$'
|
|
line: '\1never'
|
|
|
|
- name: add yaVDR PPAs
|
|
apt_repository:
|
|
repo: '{{ item }}'
|
|
state: present
|
|
update_cache: yes
|
|
with_items: '{{ repositories }}'
|
|
|
|
- name: upgrade existing packages
|
|
apt:
|
|
upgrade: dist
|
|
update_cache: yes
|
|
|
|
- name: apt | install basic packages
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: present
|
|
install_recommends: no
|
|
with_items:
|
|
- anacron
|
|
- at
|
|
- bash-completion
|
|
- biosdevname
|
|
- linux-firmware
|
|
- psmisc
|
|
- python-kmodpy
|
|
- python-usb
|
|
- python3-usb
|
|
- software-properties-common
|
|
- ssh
|
|
- ubuntu-drivers-common
|
|
- wget
|
|
- wpasupplicant
|
|
- usbutils
|
|
- xfsprogs
|
|
|
|
- name: apt | install extra packages
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: present
|
|
install_recommends: no
|
|
with_items:
|
|
'{{ extra_packages }}'
|
|
|
|
- name: create media directories
|
|
file:
|
|
dest: '{{ item.value }}'
|
|
owner: '{{ vdr.user }}'
|
|
group: '{{ vdr.group }}'
|
|
state: directory
|
|
mode: '0777'
|
|
with_dict: '{{ media_dirs }}'
|
|
|
|
- name: get information about usb and pci hardware and loaded kernel modules
|
|
hardware_facts:
|
|
usb: True
|
|
pci: True
|
|
modules: True
|
|
gpus: True
|
|
- debug:
|
|
var: usb
|
|
verbosity: 1
|
|
- debug:
|
|
var: pci
|
|
verbosity: 1
|
|
- debug:
|
|
var: modules
|
|
verbosity: 1
|
|
- debug:
|
|
var: gpus
|
|
verbosity: 1
|
|
|
|
- name: "detect SAT>IP Server on the network"
|
|
action: satip_facts
|
|
|
|
- debug:
|
|
var: satip_detected
|
|
verbosity: 1
|