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

57 lines
1.1 KiB
YAML
Raw Normal View History

---
2019-05-17 16:07:17 +02:00
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: copy sound warning script
become: yes
2019-08-31 15:08:02 +02:00
template:
2019-08-31 15:05:07 +02:00
src: 'templates/akku.sh'
dest: '/opt/akku.sh'
owner: 'root'
group: 'root'
mode: '0755'
- name: copy sound warning video
become: yes
copy:
2019-08-31 15:05:07 +02:00
src: "{{ akku_sound_src }}"
dest: "{{ akku_sound_dest }}"
owner: 'root'
group: 'root'
mode: '0644'
2019-05-17 16:07:17 +02:00
when: multimedia_akku_warning|bool
- name: install zenity and mpv for notifications
become: yes
package:
2019-04-24 13:15:38 +02:00
name:
- 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 }}'
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
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
systemd:
name: cronie.service
state: started
enabled: yes
daemon_reload: yes