diff --git a/ansible/roles/install_nhc/tasks/main.yml b/ansible/roles/install_nhc/tasks/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..8ed4d4cec24988b85d9012c15d9ba15a8a48d3dc --- /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/' } +