1
0
Fork 0
mirror of https://github.com/roles-ansible/role_akku_warning.git synced 2024-08-16 10:09:50 +02:00
role_akku_warning/tasks/main.yml
2020-02-20 23:38:18 +01:00

42 lines
860 B
YAML

---
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- include_tasks: copy_media_files.yml
- name: install zenity and mpv for notifications
become: yes
package:
name:
- zenity
- mpv
state: present
when: manage_packages_akku_warning | bool
- name: Make sure cron is installed
become: true
package:
name:
- cronie
state: present
when:
- manage_packages_akku_warning | bool
- install_and_enable_cronie | bool
- name: Check akku every 2 minutes
become: yes
cron:
name: check if akku still okay
job: /opt/akku.sh
minute: '*/3'
user: '{{ akku_user }}'
cron_file: /etc/crontab
- name: Make sure cron is running
become: true
when: install_and_enable_cronie | bool
systemd:
name: cronie.service
state: started
enabled: yes
daemon_reload: yes