ansible-role-docker-host/tasks/setup-Ubuntu.yml

32 lines
715 B
YAML
Raw Normal View History

2022-10-24 12:47:10 +00:00
---
- name: Install docker prerequisites
become: true
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- vim
- haveged
- python3-pip
- name: Add docker GPG apt key
become: true
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Add docker PPA for Ubuntu {{ ansible_distribution_release }}
become: true
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
state: present
- name: Update apt and install docker-ce
become: true
apt:
name: docker-ce
state: latest
update_cache: true