My Docker installation in Ubuntu task

This page summarizes the projects mentioned and recommended in the original post on /r/ansible

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Docker Compose

    Define and run multi-container applications with Docker

    --- - name: Install aptitude apt: name: aptitude state: latest update_cache: true - name: Remove old Docker versions apt: pkg: - docker - docker-engine - docker.io - containerd - runc state: absent purge: true - name: Install required system packages apt: pkg: - apt-transport-https - ca-certificates - curl - software-properties-common - python3-pip - virtualenv - gnupg - lsb-release - python3-setuptools state: latest update_cache: true - name: Remove gpg keys if they exist #otherwise GPG doesn't run if file already exists file: path: "{{ item }}" state: absent with_items: - /usr/share/keyrings/docker-archive-keyring.gpg - /usr/share/keyrings/docker-archive-keyring.gpg_armored - name: Download Docker gpg key get_url: url: https://download.docker.com/linux/ubuntu/gpg dest: /usr/share/keyrings/docker-archive-keyring.gpg_armored checksum: sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570 # curl -sL https://download.docker.com/linux/ubuntu/gpg|sha256sum - name: De-Armor Docker GPG key shell: gpg --dearmor < /usr/share/keyrings/docker-archive-keyring.gpg_armored > /usr/share/keyrings/docker-archive-keyring.gpg # no_log: true args: creates: /usr/share/keyrings/docker-archive-keyring.gpg #https://git.deuxfleurs.fr/Deuxfleurs/infrastructure/src/commit/7852eef5a6d0eefc5914f178549f6845857a5c49/os/config/roles/common/tasks/docker.yml - name: "Add Docker's repository to APT sources list" ansible.builtin.apt_repository: repo: "deb [arch={{ architecture_map[ansible_architecture] }} signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" state: present vars: architecture_map: "x86_64": "amd64" "aarch64": "arm64" "aarch": "arm64" "armhf": "armhf" "armv7l": "armhf" - name: Install Docker engine apt: pkg: - docker-ce - docker-ce-cli - containerd.io state: present update_cache: true - name: Remove old docker compose file: path: /usr/local/bin/docker-compose state: absent # $ sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - name: "Install Docker Compose" ansible.builtin.get_url: url: "https://github.com/docker/compose/releases/download/{{ compose_version }}/docker-compose-{{ ansible_system }}-{{ ansible_architecture }}" dest: /usr/local/bin/docker-compose mode: "0755" checksum: sha256:https://github.com/docker/compose/releases/download/{{ compose_version }}/docker-compose-{{ ansible_system }}-{{ ansible_architecture }}.sha256 # curl -sL https://download.docker.com/linux/ubuntu/gpg|sha256sum vars: compose_version: 1.29.2 - name: Install Docker Module for Python pip: name: docker

  • ansible-role-docker

    Ansible Role - Docker

    before writing a playbook, check for an existing role to do the work for you

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts