Skip to content
GitLab
Explore
Sign in
Tools
Ansible
Roles
Unattended Upgrades
Compare revisions
43a87b8f1ae0b6133d71afd87049efec3b9dd9a7 to 1651b528dced7f04a80e8de1d5a7b01352ec0c5b
Commits on Source (2)
update
· 2edd7342
Дмитрий Сафронов
authored
Apr 11, 2023
2edd7342
Merge branch 'update' into 'master'
· 1651b528
Дмитрий Сафронов
authored
Apr 11, 2023
update See merge request tools/ansible/roles/unattended_upgrades!8
1651b528
Hide whitespace changes
Inline
Side-by-side
handlers/main.yml
View file @
1651b528
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
-
name
:
Restart unattended-upgrades service
-
name
:
Restart unattended-upgrades service
ansible.builtin.systemd
:
ansible.builtin.systemd
:
state
:
restarted
state
:
restarted
enabled
:
yes
enabled
:
true
masked
:
no
masked
:
false
daemon_reload
:
yes
daemon_reload
:
true
name
:
unattended-upgrades.service
name
:
unattended-upgrades.service
meta/main.yml
View file @
1651b528
...
@@ -17,7 +17,7 @@ galaxy_info:
...
@@ -17,7 +17,7 @@ galaxy_info:
# - CC-BY-4.0
# - CC-BY-4.0
license
:
LGPL-2.0-or-later
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.
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
# min_ansible_container_version:
...
@@ -42,18 +42,16 @@ galaxy_info:
...
@@ -42,18 +42,16 @@ galaxy_info:
platforms
:
platforms
:
-
name
:
Ubuntu
-
name
:
Ubuntu
versions
:
versions
:
-
focal
-
all
-
bionic
-
name
:
Linux Mint
versions
:
-
uma
-
ulyssa
-
ulyana
-
tricia
-
name
:
Debian
-
name
:
Debian
versions
:
versions
:
-
bullseye
-
all
-
buster
-
name
:
Fedora
versions
:
-
all
-
name
:
OracleLinux
versions
:
-
all
galaxy_tags
:
[]
galaxy_tags
:
[]
# List tags for your role here, one per line. A tag is a keyword that describes
# List tags for your role here, one per line. A tag is a keyword that describes
...
@@ -69,4 +67,4 @@ dependencies:
...
@@ -69,4 +67,4 @@ dependencies:
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
# if you add dependencies to this list.
allow_duplicates
:
no
allow_duplicates
:
false
tasks/
ubuntu
/main.yml
→
tasks/
deb
/main.yml
View file @
1651b528
---
---
-
name
:
Install packages
-
name
:
Install packages
apt
:
ansible.builtin.
apt
:
state
:
present
state
:
present
update_cache
:
yes
update_cache
:
true
install_recommends
:
no
install_recommends
:
false
pkg
:
pkg
:
-
unattended-upgrades
-
unattended-upgrades
-
powermgmt-base
-
powermgmt-base
-
python3-gi
-
python3-gi
-
name
:
Template a file to /etc/apt/apt.conf.d/20auto-upgrades
-
name
:
Template a file to /etc/apt/apt.conf.d/20auto-upgrades
copy
:
ansible.legacy.
copy
:
content
:
|
content
:
|
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Unattended-Upgrade "1";
dest
:
/etc/apt/apt.conf.d/20auto-upgrades
dest
:
/etc/apt/apt.conf.d/20auto-upgrades
owner
:
root
owner
:
root
group
:
root
group
:
root
mode
:
0644
mode
:
"
0644
"
notify
:
Restart unattended-upgrades service
notify
:
Restart unattended-upgrades service
-
name
:
Template a file to /etc/apt/apt.conf.d/50unattended-upgrades
-
name
:
Template a file to /etc/apt/apt.conf.d/50unattended-upgrades
copy
:
ansible.legacy.
copy
:
content
:
|
content
:
|
Unattended-Upgrade::Origins-Pattern {
Unattended-Upgrade::Origins-Pattern {
"o=*";
"o=*";
...
@@ -38,5 +38,5 @@
...
@@ -38,5 +38,5 @@
dest
:
/etc/apt/apt.conf.d/50unattended-upgrades
dest
:
/etc/apt/apt.conf.d/50unattended-upgrades
owner
:
root
owner
:
root
group
:
root
group
:
root
mode
:
0644
mode
:
"
0644
"
notify
:
Restart unattended-upgrades service
notify
:
Restart unattended-upgrades service
tasks/main.yml
View file @
1651b528
---
---
# Ubuntu
# Ubuntu
-
name
:
Perform specific setup for Ubuntu
,
Debian
& Linux Mint
-
name
:
Perform specific setup for Ubuntu
&
Debian
include_tasks
:
ubuntu
/main.yml
include_tasks
:
deb
/main.yml
when
:
ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
or ansible_distribution == 'Linux Mint'
when
:
ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
tags
:
ubuntu
tags
:
deb