docker was installed
This commit is contained in:
parent
769fc57791
commit
1921d8e077
2
hosts
2
hosts
@ -1,5 +1,5 @@
|
|||||||
[linux]
|
[linux]
|
||||||
192.168.0.60 ansible_connection=ssh ansible_user=miharu
|
192.168.0.60 ansible_connection=ssh ansible_user=ansible
|
||||||
|
|
||||||
[windows]
|
[windows]
|
||||||
192.168.0.2 ansible_connection=winrm ansible_user=ansible
|
192.168.0.2 ansible_connection=winrm ansible_user=ansible
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
- name: Install Docker
|
- name: Install Docker CE
|
||||||
hosts: linux
|
hosts: linux
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -13,22 +13,29 @@
|
|||||||
become: true
|
become: true
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt:
|
apt:
|
||||||
name: install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
|
name: "{{ packages }}"
|
||||||
state: absent
|
# state: absent
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
|
- curl
|
||||||
|
- gnupg-agent
|
||||||
|
- software-properties-common
|
||||||
|
|
||||||
- name: Install Docker GPG key
|
- name: Install Docker GPG key
|
||||||
become: true
|
become: true
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt_key:
|
apt_key:
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
url: "https://download.docker.com/linux/ubuntu/gpg"
|
||||||
state: present
|
state: present
|
||||||
id: 0EBFCD88
|
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||||
|
|
||||||
- name: Install Docker Repo
|
- name: Install Docker Repo
|
||||||
become: true
|
become: true
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/
|
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ bionic stable"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Update Repos
|
- name: Update Repos
|
||||||
@ -41,4 +48,9 @@
|
|||||||
become: true
|
become: true
|
||||||
become_method: sudo
|
become_method: sudo
|
||||||
apt:
|
apt:
|
||||||
name: docker-ce docker-ce-cli containerd.io
|
name: "{{ packages }}"
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- docker-ce
|
||||||
|
- docker-ce-cli
|
||||||
|
- containerd.io
|
Loading…
Reference in New Issue
Block a user