From: Zack Cerza Date: Mon, 10 Jul 2017 20:27:59 +0000 (-0600) Subject: Ensure subscription-manager repos are enabled X-Git-Tag: v1.0~45^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=561bccfbe5adeec2e9b342bef13961491122926c;p=cephmetrics.git Ensure subscription-manager repos are enabled We need these for dependencies of python-carbon and ceph-ansible Signed-off-by: Zack Cerza --- diff --git a/ansible/roles/ceph-grafana/defaults/main.yml b/ansible/roles/ceph-grafana/defaults/main.yml index 1e4b512..b2566e9 100644 --- a/ansible/roles/ceph-grafana/defaults/main.yml +++ b/ansible/roles/ceph-grafana/defaults/main.yml @@ -10,3 +10,7 @@ graphite: grafana_name: Local # The firewalld zone that carbon and grafana will use firewalld_zone: public +# RHEL repos that need to be enabled with subscription-manager +rhsm_repos: + - rhel-7-server-rhscon-2-installer-rpms + - rhel-7-server-optional-rpms diff --git a/ansible/roles/ceph-grafana/tasks/setup_repos.yml b/ansible/roles/ceph-grafana/tasks/setup_repos.yml index 92501ad..8136d81 100644 --- a/ansible/roles/ceph-grafana/tasks/setup_repos.yml +++ b/ansible/roles/ceph-grafana/tasks/setup_repos.yml @@ -43,6 +43,12 @@ - not use_epel - devel_mode +- name: Enable subscription-manager repos + command: "subscription-manager repos{% for repo in rhsm_repos %} --enable={{ repo }}{% endfor %}" + when: + - ansible_pkg_mgr == "yum" + - not devel_mode + - name: Install cephmetrics production repo copy: src: files/cephmetrics-prod.repo