Advertisement
Guest User

docker_install.yaml

a guest
Nov 12th, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.62 KB | None | 0 0
  1. - hosts: all  
  2.   gather_facts: false  
  3.  
  4.   tasks:  
  5.   - name: Add an apt signing key for Docker
  6.     apt_key:
  7.       url: https://download.docker.com/linux/ubuntu/gpg
  8.       state: present
  9.  
  10.   - name: Add apt repository for stable version
  11.     apt_repository:
  12.       repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
  13.       state: present
  14.  
  15.   - name: Install docker and its dependecies
  16.     apt:
  17.       name: "{{ packages }}"
  18.       state: present
  19.       update_cache: yes
  20.     vars:
  21.       packages:
  22.      - docker-ce=5:18.09.9~3-0~ubuntu-bionic
  23.       - docker-ce-cli=5:18.09.9~3-0~ubuntu-bionic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement