remove do-update script
[ansible.git] / roles / journalwatch / tasks / main.yml
index 5621a8f37da936f0412637ff61586ff1886e2efe..cfdac0df92721b14b2a147caa4e4305d162fe3f5 100644 (file)
@@ -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
+  template:
+    src: templates/{{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"