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

Commit

Permalink
Install epel-release for centos7 only. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
drmatthews authored Aug 8, 2023
1 parent f99c272 commit 0df803d
Showing 1 changed file with 18 additions and 2 deletions.
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

0 comments on commit 0df803d

Please sign in to comment.