diff --git a/tasks/copy_media_files.yml b/tasks/copy_media_files.yml index 625358c..3e8200d 100644 --- a/tasks/copy_media_files.yml +++ b/tasks/copy_media_files.yml @@ -1,7 +1,7 @@ --- - name: copy sound warning script become: true - template: + ansible.builtin.template: src: 'templates/akku.sh.j2' dest: '/opt/akku.sh' owner: 'root' @@ -10,7 +10,7 @@ - name: copy sound warning video become: true - copy: + ansible.builtin.copy: src: "{{ akku_sound_src }}" dest: "{{ akku_sound_dest }}" owner: 'root' diff --git a/tasks/main.yml b/tasks/main.yml index 0fff101..2844eb9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,14 +15,5 @@ state: present when: manage_packages_akku_warning | bool -- 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 - -# todo: systemd timer +- name: set timer + ansible.builtin.include_tasks: timer.yml diff --git a/tasks/timer.yml b/tasks/timer.yml new file mode 100644 index 0000000..c3aecce --- /dev/null +++ b/tasks/timer.yml @@ -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 +