Slurm upgrades

This commit is contained in:
Nate Coraor 2018-04-17 15:37:35 -04:00
parent cf6ebbbf8c
commit 388f666081
5 changed files with 23 additions and 7 deletions

3
defaults/main.yml Normal file
View File

@ -0,0 +1,3 @@
---
slurm_upgrade: no

View File

@ -37,6 +37,7 @@
- name: Install Slurm client (apt)
apt:
name: "{{ item }}"
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
when: ansible_os_family == "Debian"
with_items:
- slurm-client
@ -45,10 +46,17 @@
- name: Install Slurm (yum)
yum:
name: "{{ item }}"
state: latest
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
with_items:
- slurm
- slurm-munge
- munge
when: ansible_os_family == "RedHat"
# As of 17.11, this is only created if you install the example configs package
- name: Create /etc/slurm (yum)
file:
path: /etc/slurm
state: directory
when: ansible_os_family == "RedHat"
# FIXME: this task will fail if slurmservers[0] has not already completed the slurm.conf task that follows it

View File

@ -3,6 +3,7 @@
- name: Install Slurm controller packages (apt)
apt:
name: "{{ item }}"
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
when: ansible_os_family == "Debian"
with_items:
- slurm-wlm
@ -11,10 +12,11 @@
- name: Install Slurm controller packages (yum)
yum:
name: "{{ item }}"
state: latest
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
with_items:
- munge
- slurm
- slurm-munge
- slurm-slurmctld
when: ansible_os_family == "RedHat"
- name: Create slurm state directory

View File

@ -3,6 +3,7 @@
- name: Install Slurm execution host packages (apt)
apt:
name: "{{ item }}"
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
when: ansible_os_family == "Debian"
with_items:
- slurm-wlm
@ -10,10 +11,11 @@
- name: Install Slurm execution host packages (yum)
yum:
name: "{{ item }}"
state: latest
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
with_items:
- munge
- slurm
- slurm-munge
- slurm-slurmd
when: ansible_os_family == "RedHat"
- name: Create slurm spool directory

View File

@ -3,6 +3,7 @@
- name: Install Slurm DB packages (apt)
apt:
name: "{{ item }}"
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
when: ansible_os_family == "Debian"
with_items:
- slurmdbd
@ -10,7 +11,7 @@
- name: Install Slurm DB packages (yum)
yum:
name: "{{ item }}"
state: latest
state: "{{ 'latest' if slurm_upgrade else 'present' }}"
with_items:
- munge
- slurm-slurmdbd