From c55ec840bb6e3b3cf7a16abded82935fd6f8005d Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 19 Mar 2015 16:33:13 -0500 Subject: [PATCH] Move tasks related to disk monitoring scipts to main.yml Looks like we upload these for all distros, so moving them out of the redhat specific setup tasks. I've also put them into their own yaml file. Signed-off-by: Andrew Schoen --- roles/common/tasks/disk_monitoring.yml | 33 ++++++++++++++++++++++++++ roles/common/tasks/main.yml | 5 ++++ roles/common/tasks/setup-redhat.yml | 31 ------------------------ 3 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 roles/common/tasks/disk_monitoring.yml diff --git a/roles/common/tasks/disk_monitoring.yml b/roles/common/tasks/disk_monitoring.yml new file mode 100644 index 0000000..d48e229 --- /dev/null +++ b/roles/common/tasks/disk_monitoring.yml @@ -0,0 +1,33 @@ +--- +# We use these scripts to check to see if any of our test nodes have bad disks + +- name: Upload megacli and cli64 for raid monitoring and smart.pl to /usr/sbin/. + copy: + src: "../files/sbin/{{ item }}" + dest: "/usr/sbin/{{ item }}" + owner: root + group: root + mode: 0755 + with_items: + - megacli + - cli64 + +- name: Create /usr/libexec. + file: + path: /usr/libexec + owner: root + group: root + mode: 0755 + state: directory + +- name: Upload custom netsaint scripts for raid/disk/smart/monitoring to /usr/libexec/. + copy: + src: "../files/libexec/{{ item }}" + dest: "/usr/libexec/{{ item }}" + owner: root + group: root + mode: 0755 + with_items: + - smart.pl + - raid.pl + - diskusage.pl diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 9a84077..15b92e6 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -20,6 +20,11 @@ tags: - ntp-client +# upload custom disk monitoring scripts +- include: disk_monitoring.yml + tags: + - monitoring-scripts + # configure red hat specific things - include: setup-redhat.yml when: ansible_os_family == 'RedHat' diff --git a/roles/common/tasks/setup-redhat.yml b/roles/common/tasks/setup-redhat.yml index 8e04f37..b25edd7 100644 --- a/roles/common/tasks/setup-redhat.yml +++ b/roles/common/tasks/setup-redhat.yml @@ -37,37 +37,6 @@ name: ubuntu group: kvm -- name: Upload megacli and cli64 for raid monitoring and smart.pl to /usr/sbin/. - copy: - src: "../files/sbin/{{ item }}" - dest: "/usr/sbin/{{ item }}" - owner: root - group: root - mode: 0755 - with_items: - - megacli - - cli64 - -- name: Create /usr/libexec. - file: - path: /usr/libexec - owner: root - group: root - mode: 0755 - state: directory - -- name: Upload custom netsaint scripts for raid/disk/smart/monitoring to /usr/libexec/. - copy: - src: "../files/libexec/{{ item }}" - dest: "/usr/libexec/{{ item }}" - owner: root - group: root - mode: 0755 - with_items: - - smart.pl - - raid.pl - - diskusage.pl - - name: Upload rhel version specific sshd_config. template: src: "ssh/sshd_config_rhel_{{ ansible_distribution_version }}" -- 2.39.5