added ir server, squeeze server, ...

This commit is contained in:
Martin Bauer
2020-05-16 18:35:44 +02:00
parent 93034dd0ec
commit 23a2c1fb50
20 changed files with 227 additions and 47 deletions

View File

@@ -0,0 +1,7 @@
Musik Server Wohnzimmer oben
|~~~~~~~~~~~~~~~|
|~~~~~~~~~~~~~~~|
| |
/~~\| /~~\|
\__/ \__/

View File

@@ -70,19 +70,25 @@
ignore_errors: yes #to avoid error when WiFi is not present
- name: Change WiFi country
command: "raspi-config nonint do_wifi_country {{ wifi_country }}"
when: wifi_ssid | bool
when: configure_wifi
- name: Set WiFi credentials
command: "raspi-config nonint do_wifi_ssid_passphrase {{ wifi_ssid }} {{ lookup('keepass', bauer_wifi) }}"
when: wifi_ssid | bool
- name: Copy WIFI watchdog script
copy: src=wifi-watchdog.sh dest=/usr/sbin/wifi-watchdog.sh
when: wifi_ssid | bool
- name: Run WIFI watchdog script periodically
cron:
name: "WIFI Watchdog"
minute: "*/15"
job: /usr/sbin/wifi-watchdog.sh
when: wifi_ssid | bool
command: "raspi-config nonint do_wifi_ssid_passphrase {{ wifi_ssid }} {{ lookup('keepass', 'bauer_wifi') }}"
when: configure_wifi
- name: Install watchdog
apt: name=watchdog cache_valid_time=7200 state=present
when: not wifi_ssid is defined
- name: Configure watchdog
blockinfile:
path: /etc/watchdog.conf
block: |
interface = wlan0
retry-timeout = 90
ping = {{router_ip}}
interval = 15
when: configure_wifi
- name: Start watchdog
systemd: name=watchdog state=restarted enabled=yes daemon_reload=yes
when: configure_wifi
# Message of the day
- name: Set Message of the day
copy: src=motd/{{ pi_hostname.stdout }} dest=/etc/motd