---
-- 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' }}"
- 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' 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:
name: "{{ item }}"
---
+- include: setup_repos.yml
+ when: not containerized_deployment
+ tags:
+ - packages
+
- include: install_packages.yml
when: not containerized_deployment
tags:
--- /dev/null
+---
+- 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' }}"
+ 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"
+ - not use_epel
+
+- name: Remove chacra repo
+ file:
+ path: /etc/yum.repos.d/cephmetrics.repo
+ state: absent
+ when:
+ - ansible_pkg_mgr == "yum"
+ - use_epel
+
+- name: Add Grafana repo
+ template:
+ src: grafana.repo
+ dest: /etc/yum.repos.d/grafana.repo
+ when:
+ - ansible_pkg_mgr == 'yum'
+ - use_epel
+
+- name: Remove Grafana repo
+ file:
+ path: /etc/yum.repos.d/grafana.repo
+ state: absent
+ when:
+ - ansible_pkg_mgr == "yum"
+ - not use_epel