2017-02-19 13:56:47 +01:00
|
|
|
---
|
|
|
|
# this playbook sets up network services for a yaVDR installation
|
2017-06-20 15:09:15 +02:00
|
|
|
|
|
|
|
- name: apt |install packages for network services
|
2017-02-19 13:56:47 +01:00
|
|
|
apt:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: present
|
|
|
|
install_recommends: no
|
|
|
|
with_items:
|
|
|
|
- avahi-daemon
|
|
|
|
- avahi-utils
|
2017-08-31 15:55:04 +02:00
|
|
|
#- biosdevname # caution: this may change device names after a minimal installation!
|
2017-02-19 13:56:47 +01:00
|
|
|
- ethtool
|
|
|
|
- nfs-common
|
|
|
|
- vdr-addon-avahi-linker
|
|
|
|
- wakeonlan
|
|
|
|
|
2017-02-22 15:27:48 +01:00
|
|
|
# Does this really work? We need a way to check if an interface supports WOL - Python Skript?
|
|
|
|
# - name: check WOL capabilities of network interfaces
|
|
|
|
# shell: 'ethtool {{ item }} | grep -Po "(?<=Supports\sWake-on:\s).*$"'
|
|
|
|
# register: wol
|
|
|
|
# with_items: '{% for interface in ansible_interfaces if interface != 'lo' and interface != 'bond0' %}'
|
2017-06-21 12:46:51 +02:00
|
|
|
|
2017-07-08 13:37:35 +02:00
|
|
|
- name: restart autofs if running
|
2017-06-21 12:46:51 +02:00
|
|
|
systemd:
|
|
|
|
name: autofs
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
|
|
|
|
|
|
|
- name: ensure autofs is running
|
|
|
|
systemd:
|
|
|
|
name: autofs
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
|
|
|
|
2017-07-08 13:37:35 +02:00
|
|
|
- name: restart avahi-linker if running
|
|
|
|
systemd:
|
|
|
|
name: avahi-linker
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
|
|
|
|
2017-06-21 12:46:51 +02:00
|
|
|
- name: start avahi-linker
|
|
|
|
systemd:
|
|
|
|
name: avahi-linker
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
2017-07-16 08:29:13 +02:00
|
|
|
|
|
|
|
- name: enable and start additional services for avahi-linker
|
|
|
|
systemd:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
masked: no
|
|
|
|
with_items:
|
|
|
|
- vdr-net-monitor
|
|
|
|
- vdr-update-monitor
|
|
|
|
- prevent-umount-on-pause
|