Skip to content

Commit

Permalink
prepend slurm binaries to PATH instead of symlinking
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb committed Jul 24, 2024
1 parent 513516c commit 4200fa3
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions tasks/install-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4200fa3

Please sign in to comment.