Skip to content

Commit b35f61c

Browse files
authored
Support memory limits and pam no-login in compute-init (#568)
* set locked mem limits on user nodes, configure login access * reorder compute-init.yml to reflect slurm.yml playbook
1 parent b9a71b0 commit b35f61c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ansible/roles/compute_init/files/compute-init.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,27 @@
287287
enabled: true
288288
state: started
289289

290+
- name: Set locked memory limits on user-facing nodes
291+
lineinfile:
292+
path: /etc/security/limits.conf
293+
regexp: '\* soft memlock unlimited'
294+
line: "* soft memlock unlimited"
295+
296+
- name: Configure sshd pam module
297+
blockinfile:
298+
path: /etc/pam.d/sshd
299+
insertafter: 'account\s+required\s+pam_nologin.so'
300+
block: |
301+
account sufficient pam_access.so
302+
account required pam_slurm.so
303+
304+
- name: Configure login access control
305+
blockinfile:
306+
path: /etc/security/access.conf
307+
block: |
308+
+:adm:ALL
309+
-:ALL:ALL
310+
290311
- name: Ensure node is resumed
291312
# TODO: consider if this is always safe for all job states?
292313
command: scontrol update state=resume nodename={{ ansible_hostname }}

0 commit comments

Comments
 (0)