123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ---
- - name: install packages for slurm
- yum:
- name:
- - munge
- - mariadb
- - mariadb-devel
- - python3
- state: present
- tags: install
- - name: create munge key
- command: /usr/sbin/create-munge-key -f
- tags: install
- - name: Copy munge key
- copy:
- src: munge.key
- dest: /etc/munge
- owner: munge
- group: munge
- mode: 0400
- tags: install
- - name: Copy example Slurm Configuration - slurm.conf
- copy:
- src: slurm.conf
- dest: /etc/slurm/
- mode: 0644
- tags: install
- - name: create SLURM Group
- group:
- name: slurm
- state: present
- tags: install
- - name: Add the user 'slurm' with uid 6001 and a primary group of 'slurm'
- user:
- name: slurm
- comment: Slurm User Account
- uid: 6001
- group: slurm
- tags: install
- - name: create SLURM log directory
- file:
- path: /var/log/slurm
- state: directory
- owner: slurm
- group: slurm
- mode: 0755
- recurse: yes
- tags: install
- - name: give slurm user permission to spool
- file:
- path: /var/spool/slurm
- owner: slurm
- group: slurm
- state: directory
- mode: 0755
- recurse: yes
- - name: give slurm user permission to slurmctld
- file:
- path: /var/run/slurmctld.pid
- owner: slurm
- group: slurm
- mode: 0755
- state: touch
- - name: give slurm user permission to slurmd
- file:
- path: /var/run/slurmd.pid
- owner: slurm
- group: slurm
- mode: 0755
- state: touch
- - name: start munge service
- service:
- name: munge
- state: restarted
- enabled: yes
- tags: install
|