Update 'roles/docker/tasks/centos.yml'

This commit is contained in:
panda 2022-11-04 01:08:55 +01:00
parent 981757b99e
commit fa98d62050

View file

@ -1,3 +1,29 @@
- name: "Installing Docker Prerequisite packages"
ansible.builtin.yum:
name: "{{ packages }}"
vars:
packages:
- yum-utils
- 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
- name: Install docker on CentOS (tested on 7)
ansible.builtin.yum:
name: "{{ packages }}"