forked from Eshwardvp/interview-questions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebian1.yml
32 lines (28 loc) · 898 Bytes
/
debian1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
- name: install Docker
hosts: all
become: true
tasks:
- name: Install apt-transport-https
ansible.builtin.apt:
name:
- apt-trasport-https
- ca-certificates
- lsb-release
- gnupg
state: latest
update_cache: true
- name: Add signing key
ansible.builtin.apt_key:
url: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
state: present
- name: Add repository into sources list
ansible.builtin.apt_repository:
repo: "deb [arch={{ ansible_architecture }}] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
state: present
filename: docker
- name: Install docker-ce
ansible.builtin.apt:
name: "docker-ce"
state: latest
update_cache: true