Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian Buster is now supported #12

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- name: systemd reload
systemd:
daemon_reload: yes

- name: reload slurmd
service:
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ galaxy_info:
versions:
- jessie
- stretch
- buster
- name: Ubuntu
versions:
- xenial
Expand Down
29 changes: 29 additions & 0 deletions tasks/slurmctld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,32 @@
mode: 0755
state: directory
when: slurm_create_dirs and __slurm_config_merged.SlurmctldLogFile != omit

- name: 'Service slurmctld : Directory of Pidfile must exist and set slurm group permission'
lineinfile:
path: /lib/systemd/system/slurmctld.service
regexp: '{{ item.regexp }}'
line: "{{ item.line }}"
insertafter: '\[Service\]'
loop:
- line : 'RuntimeDirectory={{ __slurm_config_merged.SlurmctldPidFile.split("/")[-2] }}'
regexp : '^RuntimeDirectory'
- line : "Group={{ __slurm_group_name }}"
regexp : '^Group'
- line : 'RuntimeDirectoryMode=0770'
regexp : '^RuntimeDirectoryMode'
notify:
- systemd reload
- reload slurmdbd
when: ansible_distribution == 'Debian'

- name: Service slurmctld , option PIDFile
lineinfile:
path: /lib/systemd/system/slurmctld.service
regexp: 'PIDFile'
line: "PIDFile={{ __slurm_config_merged.SlurmctldPidFile }}"
insertafter: '\[Service\]'
when: __slurm_config_merged.SlurmctldPidFile is defined
notify:
- systemd reload
- reload slurmdbd
29 changes: 29 additions & 0 deletions tasks/slurmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,32 @@
- name: cgroup.conf
config: slurm_cgroup_config
when: item.config in vars

- name: 'Service slurmd : Directory of Pidfile must exist and set slurm group permission'
lineinfile:
path: /lib/systemd/system/slurmd.service
regexp: '{{ item.regexp }}'
line: "{{ item.line }}"
insertafter: '\[Service\]'
loop:
- line : 'RuntimeDirectory={{ __slurm_config_merged.SlurmdPidFile.split("/")[-2] }}'
regexp : '^RuntimeDirectory'
- line : "Group={{ __slurm_group_name }}"
regexp : '^Group'
- line : 'RuntimeDirectoryMode=0770'
regexp : '^RuntimeDirectoryMode'
notify:
- systemd reload
- reload slurmdbd
when: ansible_distribution == 'Debian'

- name: Service slurmctld , option PIDFile
lineinfile:
path: /lib/systemd/system/slurmd.service
regexp: 'PIDFile'
line: "PIDFile={{ __slurm_config_merged.SlurmdPidFile }}"
insertafter: '\[Service\]'
when: __slurm_config_merged.SlurmdPidFile is defined
notify:
- systemd reload
- reload slurmdbd
34 changes: 33 additions & 1 deletion tasks/slurmdbd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
- name: Install slurmdbd.conf
template:
src: generic.conf.j2
dest: "{{ slurm_config_dir }}/slurmdbd.conf"
dest: "{{ slurm_config_dir }}/{{ item.name }}"
owner: "{{ __slurm_user_name }}"
group: root
mode: 0400
with_items:
- name: slurmdbd.conf
config: __slurmdbd_config_merged
notify:
- reload slurmdbd

Expand All @@ -23,3 +26,32 @@
mode: 0755
state: directory
when: slurm_create_dirs and __slurmdbd_config_merged.LogFile

- name: 'Service slurmdbd : Directory of Pidfile must exist and set slurm group permission'
lineinfile:
path: /lib/systemd/system/slurmdbd.service
regexp: '{{ item.regexp }}'
line: "{{ item.line }}"
insertafter: '\[Service\]'
loop:
- line : 'RuntimeDirectory={{ __slurmdbd_config_merged.PidFile.split("/")[-2] }}'
regexp : '^RuntimeDirectory'
- line : "Group={{ __slurm_group_name }}"
regexp : '^Group'
- line : 'RuntimeDirectoryMode=0770'
regexp : '^RuntimeDirectoryMode'
notify:
- systemd reload
- reload slurmdbd
when: ansible_distribution == 'Debian'

- name: Service slurmdbd , option PIDFile
lineinfile:
path: /lib/systemd/system/slurmdbd.service
regexp: 'PIDFile'
line: "PIDFile={{ __slurmdbd_config_merged.PidFile }}"
insertafter: '\[Service\]'
when: __slurmdbd_config_merged.PidFile is defined
notify:
- systemd reload
- reload slurmdbd