From 7dce5a5709066f452223365e92f78c772d6b2f46 Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Fri, 4 Aug 2017 07:54:32 +0200 Subject: [PATCH] debian-updates: install missing pkgs, fix config template --- debian-updates/tasks/main.yml | 15 ++++++++++++++- debian-updates/templates/config.py.j2 | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/debian-updates/tasks/main.yml b/debian-updates/tasks/main.yml index 11294ce..5307520 100644 --- a/debian-updates/tasks/main.yml +++ b/debian-updates/tasks/main.yml @@ -3,8 +3,21 @@ - name: ensure any dependencies are available apt: - name: python3 + name: "{{ item }}" state: installed + with_items: + - python3 + - fortune-mod + - fortunes + - fortunes-off + tags: + - debian-updates + +- name: ensure fortune is in PATH + file: + state: link + path: /usr/local/bin/fortune + src: /usr/games/fortune tags: - debian-updates diff --git a/debian-updates/templates/config.py.j2 b/debian-updates/templates/config.py.j2 index 52fa054..eb3c34f 100644 --- a/debian-updates/templates/config.py.j2 +++ b/debian-updates/templates/config.py.j2 @@ -4,7 +4,7 @@ lock_file = '/opt/debian-updates/.json-sync.lock' report_file = '/opt/debian-updates/apticron.json' tracker_file = '/opt/debian-updates/security.json' -notify_subject = '{{ (domain|splitext|first).upper() }} daily update report on '+str(datetime.date.today()) +notify_subject = '{{ (domain.split(".")|first).upper() }} daily update report on '+str(datetime.date.today()) notify_from = '{{ debupdates_from }}' notify_recipient = ['{{ debupdates_to|join("', '") }}'] notify_header = 'Debian Update Notifier/v0.1' -- GitLab