From 3fe956c8614962a02c3915bb4b9b0801c488b31f Mon Sep 17 00:00:00 2001 From: Eesaan Atluri <atlurie@uab.edu> Date: Wed, 21 Jun 2023 11:22:12 -0500 Subject: [PATCH] Add role to install LBNL Node Health Check tool --- ansible/roles/install_nhc/tasks/main.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ansible/roles/install_nhc/tasks/main.yml diff --git a/ansible/roles/install_nhc/tasks/main.yml b/ansible/roles/install_nhc/tasks/main.yml new file mode 100644 index 0000000..8ed4d4c --- /dev/null +++ b/ansible/roles/install_nhc/tasks/main.yml @@ -0,0 +1,36 @@ +--- +- name: Download the rpm + ansible.builtin.get_url: + url: "{{ nhc_download_url }}" + dest: "{{ nhc_download_path }}" + +- name: Clone the NHC config repo + ansible.builtin.git: + repo: "{{ nhc_git_repo }}" + dest: "{{ nhc_git_repo_path }}" + +- name: Install NHC + ansible.builtin.yum: + name: "{{ nhc_download_path }}" + state: latest + +- name: Create test files to ensure that a file on GPFS is readable + ansible.builtin.file: + path: "{{ item }}" + state: touch + loop: + - /data/.nhc-test + - /scratch/.nhc-test + +- name: Copy config files + ansible.builtin.copy: + src: "{{ nhc_git_repo_path }}/{{ item.src }}" + dest: "{{ item.dest }}" + owner: root + group: root + mode: '0644' + remote_src: true + loop: + - { src: 'nhc/nhc.conf' , dest: '/etc/nhc/' } + - { src: 'nhc/nhc.etc.sysconfig', dest: '/etc/sysconfig/nhc/' } + -- GitLab