From 267b4500c7a1ca9d5fbf6444eda3b47efa5576ad Mon Sep 17 00:00:00 2001 From: SecretMineDE Date: Sun, 3 Mar 2024 12:35:13 +0100 Subject: [PATCH] finally fix template --- tasks/main.yml | 2 +- templates/unattended-upgrades.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 42cb8cc..f8b14e1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,7 +18,7 @@ when: "autoupdate_enabled" - name: "Restart service" - ansible.builtin.systemd_service: + ansible.builtin.systemd: name: "unattended-upgrades" state: "restarted" when: "autoupdate_enabled" diff --git a/templates/unattended-upgrades.j2 b/templates/unattended-upgrades.j2 index 417466c..61eddaf 100644 --- a/templates/unattended-upgrades.j2 +++ b/templates/unattended-upgrades.j2 @@ -36,9 +36,9 @@ Unattended-Upgrade::Origins-Pattern { // "o=Debian,a=stable-updates"; // "o=Debian,a=proposed-updates"; // "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; -{{ for o in autoupdate_origins }} +{% for o in autoupdate_origins %} "origin={{ o.origin }}{{ ',codename=' ~ o.codename if o.codename is defined }}{{ ',archive=' ~ o.archive if o.archive is defined }}"; -{{ endfor }} +{% endfor %} };