Skip to content

Instantly share code, notes, and snippets.

@petarnikolovski
Created December 9, 2018 18:46
Show Gist options
  • Select an option

  • Save petarnikolovski/d3a9b080d6b3f1149104b10a81921635 to your computer and use it in GitHub Desktop.

Select an option

Save petarnikolovski/d3a9b080d6b3f1149104b10a81921635 to your computer and use it in GitHub Desktop.

Revisions

  1. Petar Nikolovski created this gist Dec 9, 2018.
    31 changes: 31 additions & 0 deletions docker.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    - name: Install Docker
    hosts: all
    become: yes
    tasks:

    - name: Install Docker dependencies
    apt:
    pkg:
    - apt-transport-https
    - ca-certificates
    - software-properties-common
    state: present
    update_cache: yes

    - name: Add GPG key
    apt_key:
    url: https://download.docker.com/linux/ubuntu/gpg
    state: present

    - name: Add stable Docker repository
    apt_repository:
    repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
    state: present
    update_cache: yes

    - name: Install latest Docker CE
    apt:
    pkg:
    - docker-ce
    state: present
    update_cache: yes