mirror of
https://github.com/roles-ansible/role_akku_warning.git
synced 2024-08-16 10:09:50 +02:00
use ansible collection names
This commit is contained in:
parent
c4ea20b5b5
commit
61d4dc0e96
3 changed files with 16 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: copy sound warning script
|
- name: copy sound warning script
|
||||||
become: true
|
become: true
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: 'templates/akku.sh.j2'
|
src: 'templates/akku.sh.j2'
|
||||||
dest: '/opt/akku.sh'
|
dest: '/opt/akku.sh'
|
||||||
owner: 'root'
|
owner: 'root'
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
- name: copy sound warning video
|
- name: copy sound warning video
|
||||||
become: true
|
become: true
|
||||||
copy:
|
ansible.builtin.copy:
|
||||||
src: "{{ akku_sound_src }}"
|
src: "{{ akku_sound_src }}"
|
||||||
dest: "{{ akku_sound_dest }}"
|
dest: "{{ akku_sound_dest }}"
|
||||||
owner: 'root'
|
owner: 'root'
|
||||||
|
|
|
@ -15,14 +15,5 @@
|
||||||
state: present
|
state: present
|
||||||
when: manage_packages_akku_warning | bool
|
when: manage_packages_akku_warning | bool
|
||||||
|
|
||||||
- name: Check akku every 3 minutes
|
- name: set timer
|
||||||
become: true
|
ansible.builtin.include_tasks: timer.yml
|
||||||
ansible.builtin.cron:
|
|
||||||
name: check if akku still okay
|
|
||||||
job: /opt/akku.sh
|
|
||||||
minute: '*/3'
|
|
||||||
user: '{{ akku_user }}'
|
|
||||||
cron_file: /etc/crontab
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
# todo: systemd timer
|
|
||||||
|
|
12
tasks/timer.yml
Normal file
12
tasks/timer.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
- name: Check akku every 3 minutes
|
||||||
|
become: true
|
||||||
|
ansible.builtin.cron:
|
||||||
|
name: check if akku still okay
|
||||||
|
job: /opt/akku.sh
|
||||||
|
minute: '*/3'
|
||||||
|
user: '{{ akku_user }}'
|
||||||
|
cron_file: /etc/crontab
|
||||||
|
state: absent
|
||||||
|
failed_when: false
|
||||||
|
|
Loading…
Reference in a new issue