]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
common: Move smartmontools to disk_monitoring task
authorDavid Galloway <dgallowa@redhat.com>
Tue, 12 Jul 2016 19:31:52 +0000 (15:31 -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/disk_monitoring.yml
roles/common/tasks/nagios.yml

index 2d06a177ee2526f15aa607c918141f5424636106..0cf7bcfa8eeab7ca3e6d316970a0619e536f3fe0 100644 (file)
@@ -1,6 +1,13 @@
 ---
 # We use these scripts to check to see if any of our test nodes have bad disks
 
+# Ignore errors in case there are no repos enabled and package install fails
+- name: Make sure smartmontools is installed
+  package:
+    name: smartmontools
+    state: latest
+  ignore_errors: true
+
 - name: Upload megacli and cli64 for raid monitoring and smart.pl to /usr/sbin/.
   copy:
     src: "../files/sbin/{{ item }}"
index 76f5ad53066508b60692ca3234c697b71e6f7753..934b872c43ca7f3f8ade57e9e9d14f0b2e9954ae 100644 (file)
 
 - name: Install nrpe package and dependencies (RHEL/CentOS)
   yum:
-    name: "{{ item }}"
+    name: "{{ nrpe_service_name }}"
     state: latest
     enablerepo: epel
-  with_items:
-    - nrpe
-    - smartmontools
   when: ansible_pkg_mgr == "yum" and
         have_epel.rc == 0
 
 - name: Install nrpe package and dependencies (Ubuntu)
   apt:
-    name: "{{ item }}"
+    name: "{{ nrpe_service_name }}"
     state: latest
-  with_items:
-    - nagios-nrpe-server
-    - smartmontools
   when: ansible_pkg_mgr == "apt"
 
 - name: Upload nagios sudoers.d for raid utilities.