Add docker installation role

This commit is contained in:
Marty Oehme 2021-07-24 16:01:56 +02:00
parent 1fe4c617db
commit 89453cd53b
Signed by: Marty
GPG key ID: B7538B8F50A1C800
3 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,47 @@
- name: Ensure requirements installed
ansible.builtin.package:
name: "{{ requisites }}"
state: present
update_cache: yes
tags:
- apt
- download
- packages
become: true
- name: Ensure docker GPG apt key exists
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
tags:
- apt
- repository
become: true
- name: Ensure docker repository exists
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu focal stable
state: present
tags:
- apt
- repository
become: true
- name: Ensure latest docker-ce installed
ansible.builtin.package:
name: "{{ packages }}"
state: latest
tags:
- apt
- download
- packages
become: true
- name: Ensure docker module for python installed
pip:
name: docker
tags:
- pip
- python
- packages
become: true