aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/apt
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-09-01 00:26:13 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-09-01 00:26:13 +0200
commita89e16c44ee6d038e4f4cf435902e66558cc5cf4 (patch)
tree745201ec1b6b2e6f5239cf4feaf790fb4a138654 /roles/apt
parentapt: don't remove after autoremoving dependencies (diff)
downloadinfra-ansible-a89e16c44ee6d038e4f4cf435902e66558cc5cf4.tar.gz
infra-ansible-a89e16c44ee6d038e4f4cf435902e66558cc5cf4.zip
sort module args, add missing state args, etc.
Diffstat (limited to '')
-rw-r--r--roles/apt/tasks/main.yml4
-rw-r--r--roles/apt/tasks/unattended_upgrades.yml2
-rw-r--r--roles/apt_repo/tasks/main.yml6
3 files changed, 8 insertions, 4 deletions
diff --git a/roles/apt/tasks/main.yml b/roles/apt/tasks/main.yml
index 36b8b07..530519d 100644
--- a/roles/apt/tasks/main.yml
+++ b/roles/apt/tasks/main.yml
@@ -1,9 +1,9 @@
- name: Upgrade packages
become: true
ansible.builtin.apt:
- install_recommends: false
update_cache: true
upgrade: dist
+ install_recommends: false
notify: apt_reboot
- name: Reboot if necessary
@@ -19,9 +19,9 @@
- name: Install packages
become: true
ansible.builtin.apt:
- install_recommends: false
name: '{{ apt_packages }}'
state: present
+ install_recommends: false
- name: Configure unattended-upgrades
ansible.builtin.include_tasks: unattended_upgrades.yml
diff --git a/roles/apt/tasks/unattended_upgrades.yml b/roles/apt/tasks/unattended_upgrades.yml
index 7549ec2..e9fdd05 100644
--- a/roles/apt/tasks/unattended_upgrades.yml
+++ b/roles/apt/tasks/unattended_upgrades.yml
@@ -1,9 +1,9 @@
- name: Install unattended-upgrades
become: true
ansible.builtin.apt:
- install_recommends: false
name: unattended-upgrades
state: present
+ install_recommends: false
- name: 50unattended-upgrades
become: true
diff --git a/roles/apt_repo/tasks/main.yml b/roles/apt_repo/tasks/main.yml
index 3e87d38..ef34bf5 100644
--- a/roles/apt_repo/tasks/main.yml
+++ b/roles/apt_repo/tasks/main.yml
@@ -10,13 +10,17 @@
- name: Create keys directory
ansible.builtin.file:
path: '{{ apt_repo_keys_dir }}'
- mode: '755'
state: directory
+ owner: root
+ group: root
+ mode: '755'
- name: 'Add key: {{ apt_repo_name }}'
ansible.builtin.get_url:
url: '{{ apt_repo_key_url }}'
dest: '{{ key_path }}'
+ owner: root
+ group: root
mode: '644'
notify: apt_repo_update