diff --git a/roles/slurm-common/tasks/installSlurmFromSource.yml b/roles/slurm-common/tasks/installSlurmFromSource.yml index c0414c4f30f6870777207d8ceb745c3adf32f279..f87bbd8ea9a8c6bf25611a7ce89448a20d5bf61b 100644 --- a/roles/slurm-common/tasks/installSlurmFromSource.yml +++ b/roles/slurm-common/tasks/installSlurmFromSource.yml @@ -23,22 +23,56 @@ stat: path="{{ slurm_dir }}/bin/srun" register: stat_srun +- name: stat ucx + stat: path="/usr/local/ucx/" + register: stat_ucx + +- name: Create ucx directory if it does not exist + ansible.builtin.file: + path: /usr/local/ucx/ + state: directory + owner: damienl + group: systems + mode: '0755' + become: true + when: not stat_ucx.stat.exists + +- name: unarchive ucx + unarchive: + args: + src: "http://consistency0/src/ucx_1_8_0.tar.gz" + copy: no + dest: /usr/local/ucx/ + creates: /usr/local/ucx/1.8.0 + become: true + register: newucx + +- name: symlink ucx to latest + ansible.builtin.file: + src: /usr/local/ucx/1.8.0 + dest: /usr/local/ucx/latest + state: link + owner: damienl + group: systems + mode: '0755' + become: true + when: newucx.changed - name: configure slurm centos - command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix=/usr/local/pmix/latest + command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix=/usr/local/pmix/latest --with-ucx=/usr/local/ucx/1.8.0 args: creates: "{{ slurm_dir }}/bin/srun" chdir: /tmp/slurm-{{ slurm_version }} - when: + when: - force_slurm_recompile is defined or not stat_srun.stat.exists - ansible_os_family == 'RedHat' - name: configure slurm ubuntu - command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix + command: /tmp/slurm-{{ slurm_version }}/configure --prefix={{ slurm_dir }} --with-munge={{ munge_dir }} --enable-pam --with-pmix --with-ucx args: creates: "{{ slurm_dir }}/bin/srun" chdir: /tmp/slurm-{{ slurm_version }} - when: + when: - force_slurm_recompile is defined or not stat_srun.stat.exists - ansible_os_family == 'Debian'