Compare commits

4 Commits
master ... main

Author SHA1 Message Date
267b4500c7 finally fix template 2024-03-03 12:35:13 +01:00
aed9ebce3c fix condition maybe 2024-03-03 10:53:11 +01:00
0b1b8fff9e add brackets 2024-03-03 10:47:48 +01:00
741fd32d58 fix template task 2024-03-03 10:43:17 +01:00
2 changed files with 8 additions and 7 deletions

View File

@@ -8,16 +8,17 @@
- name: "Deploy configs"
ansible.builtin.template:
src: "templates/{{ item.template }}"
src: "templates/{{ item.src }}"
dest: "{{ item.dest }}"
loop:
- template: "auto-upgrades.j2"
- src: "auto-upgrades.j2"
dest: "/etc/apt/apt.conf.d/20auto-upgrades"
- template: "unattended-upgrades.j2"
- src: "unattended-upgrades.j2"
dest: "/etc/apt/apt.conf.d/50unattended-upgrades"
when: "autoupdate_enabled"
- name: "Restart service"
ansible.builtin.systemd_service:
ansible.builtin.systemd:
name: "unattended-upgrades"
state: "restarted"
when: "autoupdate_enabled"

View File

@@ -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 }}
"origin={{ o.origin }}{{ ',codename=' + o.codename if o.codename is defined }}{{ ',archive=' + o.archive if o.archive is defined }}";
{{ endfor }}
{% 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 %}
};