]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Move nrpe package install to common role
authorDavid Galloway <dgallowa@redhat.com>
Mon, 11 Jul 2016 22:55:15 +0000 (18:55 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 13 Jul 2016 03:39:23 +0000 (23:39 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/common/tasks/nagios.yml

index 259a2298894fa2d3653d957d2f13727bd2cbacab..7d83766f9edbeefa904349358a077dc822aa2d31 100644 (file)
@@ -1,4 +1,31 @@
 ---
+- name: Include apt_system vars
+  include_vars: apt_systems.yml
+  when: ansible_pkg_mgr == "apt"
+
+- name: Include yum_systems vars
+  include_vars: yum_systems.yml
+  when: ansible_pkg_mgr == "yum"
+
+- name: Install nrpe package and dependencies (RHEL/CentOS)
+  yum:
+    name: "{{ item }}"
+    state: latest
+    enablerepo: epel
+  with_items:
+    - nrpe
+    - smartmontools
+  when: ansible_pkg_mgr == "yum"
+
+- name: Install nrpe package and dependencies (Ubuntu)
+  apt:
+    name: "{{ item }}"
+    state: latest
+  with_items:
+    - nagios-nrpe-server
+    - smartmontools
+  when: ansible_pkg_mgr == "apt"
+
 - name: Upload nagios sudoers.d for raid utilities.
   template:
     src: nagios/90-nagios