Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Install epel-release for centos7 only. #4

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
- name: Ensure docker dependencies are installed
ansible.builtin.yum:
name: ["yum-utils", "device-mapper-persistent-data", "lvm2", "epel-release"]
name: "{{ item }}"
state: installed
loop:
- yum-utils
- device-mapper-persistent-data
- lvm2

- name: Install "epel-release" for centos:7
ansible.builtin.yum:
name: epel-release
state: installed
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"

- name: Add Docker repository
ansible.builtin.command: "yum-config-manager --add-repo={{ docker.repo_url }}"
Expand All @@ -11,8 +21,14 @@

- name: Ensure docker is installed
ansible.builtin.yum:
name: ["docker-ce", "docker-ce-cli", "containerd.io"]
name: "{{ item }}"
state: installed
loop:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin

- name: Ensure docker service directory exists
ansible.builtin.file:
Expand Down