From f06d25bc42c4fd1388a42d180c62b90e94f49a3e Mon Sep 17 00:00:00 2001 From: David Galloway Date: Tue, 12 Jul 2016 15:31:52 -0400 Subject: [PATCH] common: Move smartmontools to disk_monitoring task Signed-off-by: David Galloway --- roles/common/tasks/disk_monitoring.yml | 7 +++++++ roles/common/tasks/nagios.yml | 10 ++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/roles/common/tasks/disk_monitoring.yml b/roles/common/tasks/disk_monitoring.yml index 2d06a177..0cf7bcfa 100644 --- a/roles/common/tasks/disk_monitoring.yml +++ b/roles/common/tasks/disk_monitoring.yml @@ -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 }}" diff --git a/roles/common/tasks/nagios.yml b/roles/common/tasks/nagios.yml index 76f5ad53..934b872c 100644 --- a/roles/common/tasks/nagios.yml +++ b/roles/common/tasks/nagios.yml @@ -29,22 +29,16 @@ - 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. -- 2.47.3