Instead, use a repo on ceph.com for now.
Signed-off-by: Zack Cerza <zack@redhat.com>
--- /dev/null
+[cephmetrics]
+name=cephmetrics packages for \$basearch
+baseurl=https://chacra.ceph.com/r/cephmetrics/master/HEAD/rhel/7/flavors/default/\$basearch
+enabled=1
+gpgcheck=0
+type=rpm-md
+
+[cephmetrics-noarch]
+name=cephmetrics noarch packages
+baseurl=https://chacra.ceph.com/r/cephmetrics/master/HEAD/rhel/7/flavors/default/noarch
+enabled=1
+gpgcheck=0
+type=rpm-md
+
+[cephmetrics-source]
+name=cephmetrics source packages
+baseurl=https://chacra.ceph.com/r/cephmetrics/master/HEAD/rhel/7/flavors/default/SRPMS
+enabled=1
+gpgcheck=0
+type=rpm-md
---
containerized_deployment: false
cluster: ceph
+use_epel: false
--- /dev/null
+../../../common/files/cephmetrics.repo
\ No newline at end of file
- name: Enable EPEL
yum:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
- state: present
+ state: "{{ 'present' if use_epel else 'absent' }}"
when: ansible_pkg_mgr == "yum"
+- name: Install chacra repo
+ copy:
+ src: cephmetrics.repo
+ dest: /etc/yum.repos.d/cephmetrics.repo
+ when: ansible_pkg_mgr == "yum"
+
+- name: Remove chacra repo
+ file:
+ path: /etc/yum.repos.d/cephmetrics.repo
+ state: absent
+ when: ansible_pkg_mgr == "yum" and use_epel
+
- name: Install collectd
package:
name: collectd
state: latest
+ notify: Restart collectd
+
+- name: Install collectd-python
+ package:
+ name: collectd-python
+ state: latest
+ when: ansible_pkg_mgr == "yum" and not use_epel
+ notify: Restart collectd
---
containerized_deployment: false
+use_epel: false
graphite:
port: "{{ graphite_port | default('8080') }}"
user: admin
--- /dev/null
+../../../common/files/cephmetrics.repo
\ No newline at end of file
---
-- yum:
+- name: Enable EPEL
+ yum:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
- state: present
+ state: "{{ 'present' if use_epel else 'absent' }}"
when: ansible_pkg_mgr == "yum"
+- name: Install chacra repo
+ copy:
+ src: files/cephmetrics.repo
+ dest: /etc/yum.repos.d/cephmetrics.repo
+ when: ansible_pkg_mgr == "yum" and not use_epel
+
+- name: Remove chacra repo
+ file:
+ path: /etc/yum.repos.d/cephmetrics.repo
+ state: absent
+ when: ansible_pkg_mgr == "yum" and use_epel
+
- name: Add Grafana repo
template:
src: grafana.repo
dest: /etc/yum.repos.d/grafana.repo
- when: ansible_pkg_mgr == "yum"
+ when: ansible_pkg_mgr == 'yum' and use_epel
+
+- name: Remove Grafana repo
+ file:
+ path: /etc/yum.repos.d/grafana.repo
+ state: absent
+ when: ansible_pkg_mgr == "yum" and not use_epel
- name: Install packages
package: