From 5074bca8287225ff646480966072721cd53bcbe8 Mon Sep 17 00:00:00 2001
From: Alfredo Moralejo <amoralej@redhat.com>
Date: Wed, 5 Feb 2020 15:43:42 +0100
Subject: [PATCH] Add CentOS8 High Availability repository

High Availability packages have been added as part of core CentOS
repositories in 8.1.

This patch add this repo and enables it as it provides corosync and
pacemaker based HA solution and some other packages required for it.

Change-Id: Idbddd81f251c1ade97892128e52f9214420bead7
---
 roles/configure-mirrors/tasks/mirror/CentOS-8.yaml         | 1 +
 .../templates/centos8/etc/yum.repos.d/CentOS-HA.repo.j2    | 7 +++++++
 2 files changed, 8 insertions(+)
 create mode 100644 roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-HA.repo.j2

diff --git a/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml b/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml
index b42826f40..68d9a573b 100644
--- a/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml
+++ b/roles/configure-mirrors/tasks/mirror/CentOS-8.yaml
@@ -9,6 +9,7 @@
   with_items:
     - etc/yum.repos.d/CentOS-AppStream.repo
     - etc/yum.repos.d/CentOS-Base.repo
+    - etc/yum.repos.d/CentOS-HA.repo
     - etc/yum.repos.d/CentOS-Extras.repo
     - etc/yum.repos.d/CentOS-PowerTools.repo
     - etc/yum.repos.d/epel.repo
diff --git a/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-HA.repo.j2 b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-HA.repo.j2
new file mode 100644
index 000000000..9726d5ae8
--- /dev/null
+++ b/roles/configure-mirrors/templates/centos8/etc/yum.repos.d/CentOS-HA.repo.j2
@@ -0,0 +1,7 @@
+# {{ ansible_managed }}
+[HighAvailability]
+name=CentOS-$releasever - HA
+baseurl={{ package_mirror }}/$releasever/HighAvailability/$basearch/os/
+gpgcheck=1
+enabled=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial