---
# Note: OpenShift repositories under CentOS may be shipped through the
# "centos-release-openshift-origin" package which configures the repository.
# This task matches the file names provided by the package so that they are
# not installed twice in different files and remains idempotent.

- name: Configure origin gpg keys
  copy:
    src: "origin/gpg_keys/openshift-ansible-CentOS-SIG-PaaS"
    dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-PaaS"
  notify: refresh cache

# The version is hardcoded since we cannot use the openshift_version role
# (it uses the installed packages to determine the version).
- name: Configure correct origin release repository
  template:
    src: "CentOS-OpenShift-Origin39.repo.j2"
    dest: "/etc/yum.repos.d/CentOS-OpenShift-Origin39.repo"
  notify: refresh cache
