2019-04-07 18:52:35 +02:00
|
|
|
---
|
2019-05-17 16:07:17 +02:00
|
|
|
- include_tasks: versioncheck.yml
|
|
|
|
when: submodules_versioncheck|bool
|
|
|
|
|
2019-04-07 18:52:35 +02:00
|
|
|
- name: copy sound warning script
|
|
|
|
become: yes
|
|
|
|
copy:
|
|
|
|
src: 'files/akku.sh'
|
|
|
|
dest: '/opt/akku.sh'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
- name: copy sound warning video
|
|
|
|
become: yes
|
|
|
|
copy:
|
|
|
|
src: 'files/low_battery.mkv'
|
|
|
|
dest: '/opt/low_battery.mkv'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: '0644'
|
2019-05-17 16:07:17 +02:00
|
|
|
when: multimedia_akku_warning|bool
|
2019-04-07 18:52:35 +02:00
|
|
|
|
|
|
|
- name: install zenity and mpv for notifications
|
|
|
|
become: yes
|
|
|
|
package:
|
2019-04-24 13:15:38 +02:00
|
|
|
name:
|
2019-04-07 18:52:35 +02:00
|
|
|
- zenity
|
|
|
|
- mpv
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Check akku every 2 minutes
|
|
|
|
become: yes
|
|
|
|
cron:
|
|
|
|
name: check if akku still okay
|
|
|
|
job: /opt/akku.sh
|
|
|
|
minute: '*/3'
|
2019-04-24 13:07:10 +02:00
|
|
|
user: '{{ akku_user }}'
|
2019-04-07 18:52:35 +02:00
|
|
|
cron_file: /etc/crontab
|
|
|
|
|
|
|
|
- name: Make sure cron is installed
|
|
|
|
become: true
|
2019-05-17 16:07:17 +02:00
|
|
|
when: install_and_enable_cronie|bool
|
2019-04-07 18:52:35 +02:00
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- cronie
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Make sure cron is running
|
|
|
|
become: true
|
2019-05-17 16:07:17 +02:00
|
|
|
when: install_and_enable_cronie|bool
|
2019-04-07 18:52:35 +02:00
|
|
|
systemd:
|
|
|
|
name: cronie.service
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
daemon_reload: yes
|