--- # 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 # openshift_release is formatted to a standard string in openshift_version role. # openshift_release is expected to be in format 'x.y.z...' here. # Here, we drop the '.' characters and try to match the correct repo template # for our corresponding openshift_release. - name: Configure correct origin release repository template: src: "{{ item }}" dest: "/etc/yum.repos.d/{{ (item | basename | splitext)[0] }}" with_first_found: - "CentOS-OpenShift-Origin{{ (openshift_release | default('')).split('.') | join('') }}.repo.j2" - "CentOS-OpenShift-Origin{{ ((openshift_release | default('')).split('.') | join(''))[0:2] }}.repo.j2" - "CentOS-OpenShift-Origin.repo.j2" notify: refresh cache