Created
November 27, 2018 21:07
-
-
Save ederparaiso/a76878fd73a6d05a7c73df40114570da to your computer and use it in GitHub Desktop.
provision docker with 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: host-list | |
sudo: yes | |
tasks: | |
- name: "Installing Docker Prerequisite packages" | |
yum: | |
name: "{{ item }}" | |
state: latest | |
with_items: | |
- yum-utils | |
- device-mapper-persistent-data | |
- lvm2 | |
- name: "Configuring docker-ce repo" | |
get_url: | |
url: https://download.docker.com/linux/centos/docker-ce.repo | |
dest: /etc/yum.repos.d/docker-ce.repo | |
mode: 0644 | |
- name: "Installing Docker latest version" | |
yum: | |
name: docker-ce | |
state: present | |
- name: "Starting and Enabling Docker service" | |
service: | |
name: docker | |
state: started | |
enabled: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment