diff --git a/tasks/install-generic.yml b/tasks/install-generic.yml index b9b61c7..7c38c61 100644 --- a/tasks/install-generic.yml +++ b/tasks/install-generic.yml @@ -58,20 +58,8 @@ command: systemctl daemon-reload # noqa: command-instead-of-module no-changed-when no-handler when: _slurm_systemd_units.changed -- name: Find user binaries - find: - paths: "{{ openhpc_bin_dir }}" - register: _ohpc_binaries - -- name: Symlink slurm user binaries into $PATH - file: - src: "{{ item.path }}" - state: link - dest: "{{ ('/usr/bin', item.path | basename) | path_join }}" - owner: root - group: root - mode: u=rwx,go=rx - force: true # files may already exist - loop: "{{ _ohpc_binaries.files }}" - loop_control: - label: "{{ item.path }}" +- name: Prepend $PATH with slurm user binary location + lineinfile: + path: /etc/profile.d/slurm.sh # NB: /etc/environment not used on EL! + regexp: ^export PATH={{ openhpc_bin_dir | regex_escape }}:$PATH + line: export PATH={{ openhpc_bin_dir }}:$PATH