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 %} };