]> git-server-git.apps.pok.os.sepia.ceph.com Git - cephmetrics.git/commitdiff
ceph-collectd: Split out repo setup
authorZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 19:32:31 +0000 (13:32 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 22 Jun 2017 19:59:37 +0000 (13:59 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
ansible/roles/ceph-collectd/tasks/install_packages.yml
ansible/roles/ceph-collectd/tasks/main.yml
ansible/roles/ceph-collectd/tasks/setup_repos.yml [new file with mode: 0644]

index aa64d76611c61536f9d4ab83d8ad48a224b32953..3f4a9bcc131377c66b03811476c4b652b4891f2f 100644 (file)
@@ -1,22 +1,4 @@
 ---
-- 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: 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
index a1e2670865248d199dc624d21029355a5aa436ee..5eb334e9c8f669f22db7186107b4c39b7688bc8a 100644 (file)
@@ -1,4 +1,9 @@
 ---
+- include: setup_repos.yml
+  when: not containerized_deployment
+  tags:
+    - packages
+
 - include: install_packages.yml
   when: not containerized_deployment
   tags:
diff --git a/ansible/roles/ceph-collectd/tasks/setup_repos.yml b/ansible/roles/ceph-collectd/tasks/setup_repos.yml
new file mode 100644 (file)
index 0000000..e89cd75
--- /dev/null
@@ -0,0 +1,18 @@
+---
+- 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: 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