From 61d4dc0e9608fdf1e316f9e785c6cd4f69769f5a Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 11 Nov 2021 23:08:51 +0100 Subject: [PATCH] use ansible collection names --- tasks/copy_media_files.yml | 4 ++-- tasks/main.yml | 13 ++----------- tasks/timer.yml | 12 ++++++++++++ 3 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 tasks/timer.yml 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 +