X-Git-Url: https://git.ralfj.de/ansible.git/blobdiff_plain/5e2e9470de3933fd6560eba8ee7a4fff9568ff7c..ac9d127c4cd3ec4533f4ec3ea02dd69b517e6d50:/roles/journalwatch/tasks/main.yml diff --git a/roles/journalwatch/tasks/main.yml b/roles/journalwatch/tasks/main.yml index 5621a8f..8e64af3 100644 --- a/roles/journalwatch/tasks/main.yml +++ b/roles/journalwatch/tasks/main.yml @@ -1,2 +1,24 @@ -- import_tasks: journalwatch.yml - tags: journalwatch +- name: install journalwatch dependencies + apt: name=python3-systemd state=latest +- name: install journalwatch + git: + dest: /root/journalwatch + repo: 'https://github.com/The-Compiler/journalwatch.git' + version: b62f223bc36eabc193cfcf0d309d284da4f66463 +- name: create journalwatch config dir + file: path=/root/.config/journalwatch state=directory +- name: install journalwatch config files + copy: + src: files/{{item}} + dest: /root/.config/journalwatch/{{item}} + loop: + - config + - patterns + tags: journalwatch-patterns +- name: delete old journalwatch crontab entry + file: path=/etc/cron.d/journalwatch state=absent +- name: create journalwatch crontab entry + cron: + name: "journalwatch" + minute: "*/10" + job: "/root/journalwatch/journalwatch.py mail"