optimize APT usage

This commit is contained in:
Pim Kunis 2022-12-20 17:02:09 +01:00
parent 73105db948
commit bc8c4eac8a
4 changed files with 22 additions and 4 deletions

View file

@ -6,14 +6,17 @@
- gnupg
- lsb-release
- python3-pip
state: latest
update_cache: true
- name: Add Docker APT key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
- name: Add Docker repository
apt_repository:
repo: "deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
register: apt_repository
- name: Update APT cache
apt:
update_cache: true
when: apt_repository.changed
- name: Install Docker packages
apt:
pkg:
@ -21,8 +24,6 @@
- docker-ce-cli
- containerd.io
- docker-compose-plugin
state: latest
update_cache: true
- name: Install Docker modules for Python
pip:
name: