Browse Source

Added simple slurm client role

Renamed slurm-management role from slurm to slurm-management.
pull/11/head
Egon Rijpkema 3 years ago
parent
commit
1822568696
  1. 39
      roles/slurm-client/handlers/main.yml
  2. 48
      roles/slurm-client/tasks/main.yml
  3. 0
      roles/slurm-management/files/Dockerfile
  4. 0
      roles/slurm-management/files/acct_gather.conf
  5. 0
      roles/slurm-management/files/daemon.json
  6. 0
      roles/slurm-management/files/job_submit.lua
  7. 0
      roles/slurm-management/files/ldap.conf
  8. 0
      roles/slurm-management/files/munge.key
  9. 0
      roles/slurm-management/files/munge.service
  10. 0
      roles/slurm-management/files/nslcd.conf
  11. 0
      roles/slurm-management/files/nsswitch.conf
  12. 0
      roles/slurm-management/files/pam_ldap.conf
  13. 0
      roles/slurm-management/files/runslurmctld.sh
  14. 0
      roles/slurm-management/files/runslurmdbd.sh
  15. 0
      roles/slurm-management/files/slurm.conf
  16. 0
      roles/slurm-management/files/slurm.service
  17. 0
      roles/slurm-management/files/slurmdbd.conf
  18. 0
      roles/slurm-management/files/slurmdbd.service
  19. 0
      roles/slurm-management/files/ssmtp.conf
  20. 0
      roles/slurm-management/tasks/main.yml
  21. 0
      roles/slurm-management/vars/main.yml
  22. 5
      slurm_client.yml

39
roles/slurm-client/handlers/main.yml

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
---
#
# Important: maintain correct handler order.
# Handlers are executed in the order in which they are defined
# and not in the order in whch they are listed in a "notify: handler_name" statement!
#
# Restart before reload: an reload after a restart may be redundant but should not fail,
# but the other way around may fail when the impact of changes was too large for a reload.
#
- name: Restart munge service.
systemd:
name: 'munge.service'
state: restarted
become: true
listen: restart_munge
- name: Restart slurmd service.
systemd:
name: 'slurmd.service'
state: reloaded
become: true
listen: restart_slurmd
#
# Service reloads after restarts.
#
- name: Reload munge service.
systemd:
name: 'munge.service'
state: reloaded
become: true
listen: reload_munge
- name: Reload slurmd service.
systemd:
name: 'slurmd.service'
state: reloaded
become: true
listen: reload_slurmd
...

48
roles/slurm-client/tasks/main.yml

@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
---
- name: Install the Slurm client and NHC with yum.
yum:
state: latest
update_cache: yes
name:
- slurm
- slurm-slurmd
- lbnl-nhc
notify:
- restart_munge
- restart_slurmd
become: true
- name: Install munge_keyfile
copy:
src: roles/slurm-management/files/munge.key
owner: munge
group: munge
mode: 0600
dest: /etc/munge/munge.key
notify:
- restart_munge
- restart_slurmd
become: true
- name: Deploy slurm.conf
template:
src: roles/slurm-management/files/slurm.conf
dest: /etc/slurm/slurm.conf
owner: root
group: root
mode: 0644
notify:
- reload_slurmd
become: true
- name: Start slurm and munge services
systemd:
name: "{{ item }}"
enabled: yes
state: started
with_items:
- munge.service
- slurmd.service
become: true
...

0
roles/slurm/files/Dockerfile → roles/slurm-management/files/Dockerfile

0
roles/slurm/files/acct_gather.conf → roles/slurm-management/files/acct_gather.conf

0
roles/slurm/files/daemon.json → roles/slurm-management/files/daemon.json

0
roles/slurm/files/job_submit.lua → roles/slurm-management/files/job_submit.lua

0
roles/slurm/files/ldap.conf → roles/slurm-management/files/ldap.conf

0
roles/slurm/files/munge.key → roles/slurm-management/files/munge.key

0
roles/slurm/files/munge.service → roles/slurm-management/files/munge.service

0
roles/slurm/files/nslcd.conf → roles/slurm-management/files/nslcd.conf

0
roles/slurm/files/nsswitch.conf → roles/slurm-management/files/nsswitch.conf

0
roles/slurm/files/pam_ldap.conf → roles/slurm-management/files/pam_ldap.conf

0
roles/slurm/files/runslurmctld.sh → roles/slurm-management/files/runslurmctld.sh

0
roles/slurm/files/runslurmdbd.sh → roles/slurm-management/files/runslurmdbd.sh

0
roles/slurm/files/slurm.conf → roles/slurm-management/files/slurm.conf

0
roles/slurm/files/slurm.service → roles/slurm-management/files/slurm.service

0
roles/slurm/files/slurmdbd.conf → roles/slurm-management/files/slurmdbd.conf

0
roles/slurm/files/slurmdbd.service → roles/slurm-management/files/slurmdbd.service

0
roles/slurm/files/ssmtp.conf → roles/slurm-management/files/ssmtp.conf

0
roles/slurm/tasks/main.yml → roles/slurm-management/tasks/main.yml

0
roles/slurm/vars/main.yml → roles/slurm-management/vars/main.yml

5
slurm_client.yml

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
---
- hosts: all
become: true
roles:
- slurm-client
Loading…
Cancel
Save