42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
---
|
|
- name: Ensure extra packages are installed
|
|
hosts: proxmox
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Install packages
|
|
ansible.builtin.package:
|
|
name: "{{proxmox_packages}}"
|
|
state: present
|
|
|
|
- name: Deploy Unattended-upgrades config
|
|
copy:
|
|
src: templates/50unattended-upgrades
|
|
dest: /etc/apt/apt.conf.d/50unattended-upgrades
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
backup: true
|
|
|
|
- name: Create systemd drop-in directory for apt-daily-upgrade.timer
|
|
ansible.builtin.file:
|
|
path: /etc/systemd/system/apt-daily-upgrade.timer.d
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Override apt-daily-upgrade.timer schedule to run Sundays at 23:00
|
|
ansible.builtin.copy:
|
|
dest: /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
content: |
|
|
[Timer]
|
|
OnCalendar=
|
|
OnCalendar=Sun *-*-* 23:00:00
|
|
RandomizedDelaySec=0
|
|
Persistent=false
|
|
|