cleanup and test basic functionality

This commit is contained in:
Alexander Grothe
2017-02-22 15:27:48 +01:00
parent efac4618fa
commit 9fe824e452
12 changed files with 540 additions and 266 deletions

View File

@@ -1,8 +1,7 @@
---
# This playbook sets up the basic packages an directories for a yaVDR installation
- name: apt| prevent installation of recommended packages
- name: apt | prevent automatic installation of recommended packages
blockinfile:
dest: /etc/apt/apt.conf.d/90norecommends
create: yes
@@ -25,66 +24,22 @@
upgrade: dist
update_cache: yes
- name: install basic packages
- name: apt | install basic packages
apt:
name: '{{ item }}'
state: present
install_recommends: no
name: '{{ item }}'
state: present
install_recommends: no
with_items:
- anacron
- at
- bash-completion
- biosdevname
- linux-firmware
- psmisc
- software-properties-common
- ssh
- ubuntu-drivers-common
- vdr
- vdr-plugin-dbus2vdr
- vdrctl
- wget
- wpasupplicant
- usbutils
- xfsprogs
- name: create vdr recdir
file:
state: directory
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
mode: 0775
dest: '{{ vdr.recdir }}'
- name: set option to use hide-first-recording-level patch
blockinfile:
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
create: true
block: |
[vdr]
--hide-first-recording-level
when:
vdr.hide_first_recording_level
- name: create local dir in recdir
file:
state: directory
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
mode: 0775
dest: '{{ vdr.recdir }}/local'
when:
vdr.hide_first_recording_level
- name: create directories for media files
file:
state: directory
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
mode: 0775
dest: '{{ item }}'
with_items:
- /srv/videos
- /srv/music
- /srv/picture
- /srv/backups
- anacron
- at
- bash-completion
- biosdevname
- linux-firmware
- psmisc
- software-properties-common
- ssh
- ubuntu-drivers-common
- wget
- wpasupplicant
- usbutils
- xfsprogs