baseurl: http://example.com/my/repo
```
-These variables are only relevent when `devel_mode` is true:
-- `use_epel`: Whether or not to use EPEL and grafana.com instead of ceph.com-sourced packages for dependencies. Default: false
-
## Current Limitations
- Currently, metrics are only *displayed* for `osd` and `rgw` hosts.
- devel_mode
notify: Restart collectd
-- name: Install collectd-python
- package:
- name: collectd-python
- state: latest
- when:
- - ansible_pkg_mgr == "yum"
- - devel_mode
- - not use_epel
- notify: Restart collectd
-
- name: Install cephmetrics-collectors
package:
name: cephmetrics-collectors
dest: /etc/yum.repos.d/grafana.repo
when:
- ansible_pkg_mgr == 'yum'
- - use_epel
- devel_mode
-- name: Remove Grafana repo
- file:
- path: /etc/yum.repos.d/grafana.repo
- state: absent
- when:
- - ansible_pkg_mgr == "yum"
- - not use_epel
- - devel_mode
-
-- name: Install grafana repo
+- name: Add grafana repo
copy:
src: files/grafana.list
dest: /etc/apt/sources.list.d/grafana.list
backend:
metrics: mgr # mgr, cephmetrics
storage: prometheus # prometheus, graphite
- use_epel: false
devel_mode: true
graphite:
service: graphite-web
- name: Enable EPEL
yum:
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
- state: "{{ 'present' if use_epel else 'absent' }}"
+ state: present
when:
- ansible_pkg_mgr == "yum"
- devel_mode
-- name: Install cephmetrics development repo
- copy:
- src: files/cephmetrics-devel.repo
- dest: /etc/yum.repos.d/cephmetrics.repo
- when:
- - ansible_pkg_mgr == "yum"
- - not use_epel
- - devel_mode
-
-- name: Remove cephmetrics repo
- file:
- path: /etc/yum.repos.d/cephmetrics.repo
- state: absent
- when:
- - ansible_pkg_mgr == "yum"
- - use_epel
- - devel_mode
-
-- name: Remove old cephmetrics production repo
- file:
- path: /etc/yum.repos.d/cephmetrics.repo
- state: absent
- when:
- - ansible_pkg_mgr == "yum"
- - not devel_mode
-
- name: Add custom repos
template:
src: cephmetrics-custom.repo