Skip to content
Commits on Source (2)
......@@ -3,7 +3,7 @@
- name: Restart unattended-upgrades service
ansible.builtin.systemd:
state: restarted
enabled: yes
masked: no
daemon_reload: yes
enabled: true
masked: false
daemon_reload: true
name: unattended-upgrades.service
......@@ -17,7 +17,7 @@ galaxy_info:
# - CC-BY-4.0
license: LGPL-2.0-or-later
min_ansible_version: 2.9
min_ansible_version: "2.12"
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
......@@ -42,18 +42,16 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- focal
- bionic
- name: Linux Mint
versions:
- uma
- ulyssa
- ulyana
- tricia
- all
- name: Debian
versions:
- bullseye
- buster
- all
- name: Fedora
versions:
- all
- name: OracleLinux
versions:
- all
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
......@@ -69,4 +67,4 @@ dependencies:
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
allow_duplicates: no
allow_duplicates: false
---
- name: Install packages
apt:
ansible.builtin.apt:
state: present
update_cache: yes
install_recommends: no
update_cache: true
install_recommends: false
pkg:
- unattended-upgrades
- powermgmt-base
- python3-gi
- name: Template a file to /etc/apt/apt.conf.d/20auto-upgrades
copy:
ansible.legacy.copy:
content: |
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
dest: /etc/apt/apt.conf.d/20auto-upgrades
owner: root
group: root
mode: 0644
mode: "0644"
notify: Restart unattended-upgrades service
- name: Template a file to /etc/apt/apt.conf.d/50unattended-upgrades
copy:
ansible.legacy.copy:
content: |
Unattended-Upgrade::Origins-Pattern {
"o=*";
......@@ -38,5 +38,5 @@
dest: /etc/apt/apt.conf.d/50unattended-upgrades
owner: root
group: root
mode: 0644
mode: "0644"
notify: Restart unattended-upgrades service
---
# Ubuntu
- name: Perform specific setup for Ubuntu, Debian & Linux Mint
include_tasks: ubuntu/main.yml
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' or ansible_distribution == 'Linux Mint'
tags: ubuntu
- name: Perform specific setup for Ubuntu & Debian
include_tasks: deb/main.yml
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
tags: deb