Created
December 8, 2019 22:34
-
-
Save prashanth-sams/6a548c8f94a5be5ef0960bf7104fb96d to your computer and use it in GitHub Desktop.
Playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
tasks: | |
- name: Update the apt package index | |
become: yes | |
apt: | |
name: "*" | |
state: latest | |
update_cache: yes | |
force_apt_get: yes | |
- name: Install packages for apt add repository over HTTPS | |
become: yes | |
apt: | |
name: "{{ packagesdep }}" | |
force_apt_get: yes | |
state: latest | |
update_cache: yes | |
vars: | |
packagesdep: | |
- git | |
- apt-transport-https | |
- ca-certificates | |
- wget | |
- software-properties-common | |
- gnupg2 | |
- curl | |
- name: Add Apt signing key from official docker repo | |
apt_key: | |
url: https://download.docker.com/linux/debian/gpg | |
state: present | |
- name: add docker official repository for Debian Stretch | |
apt_repository: | |
repo: deb [arch=amd64] https://download.docker.com/linux/debian stretch stable | |
state: present | |
- name: Index new repo into the cache | |
become: yes | |
apt: | |
name: "*" | |
state: latest | |
update_cache: yes | |
force_apt_get: yes | |
- name: actually install docker | |
apt: | |
name: "docker-ce" | |
state: latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment