1
0
Fork 0
mirror of https://github.com/DO1JLR/ansible_linux_desktop_setup.git synced 2024-09-14 19:54:51 +02:00
ansible_linux_desktop_setup/roles/akku-warning/tasks/main.yml

55 lines
977 B
YAML
Raw Normal View History

2019-03-11 20:22:44 +01:00
---
- name: copy sound warning script
become: yes
copy:
src: 'files/akku.sh'
dest: '/opt/akku.sh'
owner: 'root'
group: 'root'
mode: '0755'
2019-04-07 18:33:12 +02:00
- name: copy sound warning video
become: yes
copy:
src: 'files/low_battery.mkv'
dest: '/opt/low_battery.mkv'
owner: 'root'
group: 'root'
mode: '0644'
- name: install zenity and mpv for notifications
2019-03-11 20:22:44 +01:00
become: yes
package:
2019-04-07 18:33:12 +02:00
name:
- zenity
- mpv
2019-03-11 20:22:44 +01:00
state: present
- name: Check akku every 2 minutes
become: yes
cron:
name: check if akku still okay
job: /opt/akku.sh
2019-04-07 18:33:12 +02:00
minute: '*/3'
2019-03-11 22:16:15 +01:00
user: '{{ user }}'
2019-03-11 20:22:44 +01:00
cron_file: /etc/crontab
2019-04-07 17:53:28 +02:00
- name: Make sure cron is installed
become: true
when: install_and_enable_cronie
2019-04-07 18:33:12 +02:00
package:
name:
2019-04-07 17:53:28 +02:00
- cronie
2019-04-07 18:33:12 +02:00
state: present
2019-04-07 17:53:28 +02:00
- name: Make sure cron is running
become: true
when: install_and_enable_cronie
systemd:
name: cronie.service
state: started
enabled: yes
daemon_reload: yes