Skip to content

Docker

Auto Documentation

Documentation Generated with Python on 2021-04-03

Default Variables

Tasks

main.yml

- include: install.yml

install.yml

- name: Install aptitude using apt
  become: yes
  apt:
    name: aptitude
    state: latest
    update_cache: yes
    force_apt_get: yes

- name: Install required system packages
  become: yes
  apt:
    name: "{{ item }}"
    state: latest
    update_cache: yes
  loop:
    [
      "apt-transport-https",
      "ca-certificates",
      "curl",
      "software-properties-common",
      "python3-pip",
      "virtualenv",
      "python3-setuptools",
    ]

- name: Add Docker GPG apt Key
  become: yes
  apt_key:
    url: https://download.docker.com/linux/ubuntu/gpg
    state: present

- name: Add Docker Repository
  become: yes
  apt_repository:
    repo: deb https://download.docker.com/linux/ubuntu bionic stable
    state: present

- name: Update apt and install docker-ce
  become: yes
  apt:
    update_cache: yes
    name: docker-ce
    state: latest

- name: Install Docker Module for Python
  become: yes
  pip:
    name: docker