Linux/Ansible/Playbooks: Difference between revisions

From Wiki
< Linux‎ | Ansible
No edit summary
No edit summary
Line 1: Line 1:
== Docker ==
* Docker
*: <pre>
- name: Install prerequisites
  apt:
    update_cache: yes
    name: ["apt-transport-https", "ca-certificates", "curl", "software-properties-common"]


- name: Add Docker GPG key
  apt_key: url=https://download.docker.com/linux/ubuntu/gpg
- name: Add Docker APT repository
  apt_repository:
    repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_distribution_release}} stable
- name: Install Docker
  apt: name=docker-ce
</pre>


== Docker ==
== Docker ==

Revision as of 07:52, 18 May 2019

Docker

  • Docker

- name: Install prerequisites

 apt:
   update_cache: yes
   name: ["apt-transport-https", "ca-certificates", "curl", "software-properties-common"]

- name: Add Docker GPG key

 apt_key: url=https://download.docker.com/linux/ubuntu/gpg

- name: Add Docker APT repository

 apt_repository:
   repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ansible_distribution_release}} stable

- name: Install Docker

 apt: name=docker-ce

Docker