2024-04-16 10:10:11 +02:00
|
|
|
---
|
|
|
|
- name: install slurm
|
|
|
|
hosts: all
|
|
|
|
become: true
|
|
|
|
|
|
|
|
vars:
|
|
|
|
sqlpwd: "{{ env_sql_pw}}"
|
|
|
|
sqlrootpwd: "{{ env_root_sql_pw}}"
|
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
tasks:
|
2024-04-16 10:10:11 +02:00
|
|
|
- name: export munge user
|
|
|
|
shell: "export MUNGEUSER=10001"
|
|
|
|
|
|
|
|
- name: export export SlurmUSER
|
|
|
|
shell: "export export SlurmUSER=10000"
|
2024-04-21 19:09:21 +02:00
|
|
|
|
2024-04-16 10:10:11 +02:00
|
|
|
- name: mount_info
|
|
|
|
include_tasks: yaml_sub/mount_info.yaml
|
|
|
|
|
|
|
|
- name: ldap
|
|
|
|
include_tasks: yaml_sub/ldap.yaml
|
|
|
|
|
|
|
|
- name: sssd
|
|
|
|
include_tasks: yaml_sub/sssd.yaml
|
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
- name: install docker
|
2024-04-16 10:10:11 +02:00
|
|
|
ansible.builtin.include_tasks: yaml_sub/install_docker.yaml
|
|
|
|
|
|
|
|
- name: Create volume slurm_maria_db
|
|
|
|
community.docker.docker_volume:
|
|
|
|
name: slurm_maria_db
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: Create mariab container
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: slurmmariadb
|
|
|
|
image: mariadb
|
|
|
|
state: started
|
|
|
|
recreate: no
|
|
|
|
restart_policy: always
|
|
|
|
env:
|
|
|
|
MARIADB_DATABASE: "slurm"
|
|
|
|
MARIADB_USER: "slurm"
|
|
|
|
MARIADB_PASSWORD: "{{ sqlpwd }}"
|
2024-04-21 19:09:21 +02:00
|
|
|
MARIADB_ROOT_PASSWORD: "{{ sqlrootpwd }}"
|
|
|
|
MYSQL_ROOT_HOST: "%"
|
2024-04-16 10:10:11 +02:00
|
|
|
published_ports:
|
2024-04-21 19:09:21 +02:00
|
|
|
- "3306:3306/tcp"
|
2024-04-16 10:10:11 +02:00
|
|
|
networks:
|
|
|
|
- name: bridge
|
|
|
|
comparisons:
|
|
|
|
networks: strict
|
|
|
|
volumes:
|
|
|
|
- "slurm_maria_db:/var/lib/mysql"
|
|
|
|
|
|
|
|
- name: remove other files
|
|
|
|
include_tasks: yaml_sub/myrepo_clean.yaml
|
|
|
|
- name: update file myrepo.repo
|
|
|
|
import_tasks: yaml_sub/myrepo_data.yaml
|
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
- name: install putative dependencies (1)
|
2024-04-16 10:10:11 +02:00
|
|
|
dnf:
|
2024-04-21 19:09:21 +02:00
|
|
|
name: rpm-build,gcc,python3,openssl,openssl-devel,pam-devel,numactl,numactl-devel,hwloc,hwloc-devel,munge,munge-libs,munge-devel,lua,lua-devel,readline-devel,rrdtool-devel,ncurses-devel,gtk2-devel,libibmad,libibumad,perl-Switch,perl-ExtUtils-MakeMaker,xorg-x11-xauth
|
2024-04-16 10:10:11 +02:00
|
|
|
state: present
|
|
|
|
update_cache: true
|
|
|
|
skip_broken: true
|
|
|
|
nobest: false
|
|
|
|
allowerasing: true
|
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
- name: install putative dependencies (2)
|
|
|
|
dnf:
|
|
|
|
name: munge,munge-libs,munge-devel,libssh2-devel,man2html,freeipmi-devel,http-parser-devel,json-c-devel,libjwt-devel,jq,libyaml-devel,python3-mysql
|
|
|
|
state: present
|
|
|
|
update_cache: true
|
|
|
|
skip_broken: true
|
|
|
|
nobest: false
|
|
|
|
allowerasing: true
|
2024-04-18 16:41:10 +02:00
|
|
|
|
2024-04-16 10:10:11 +02:00
|
|
|
- name: install munge server
|
|
|
|
include_tasks: yaml_sub/install_munge_server.yaml
|
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
- name: install slurm
|
|
|
|
dnf:
|
|
|
|
name: slurm,slurm-slurmctld,slurm-slurmdbd,slurm-slurmrestd,slurm-gui
|
|
|
|
state: present
|
|
|
|
update_cache: true
|
|
|
|
skip_broken: true
|
|
|
|
nobest: false
|
|
|
|
allowerasing: true
|
2024-04-16 10:10:11 +02:00
|
|
|
|
2024-04-21 19:09:21 +02:00
|
|
|
- name: Make sure slurmctld service unit is started
|
|
|
|
systemd_service:
|
|
|
|
enabled: true
|
|
|
|
state: started
|
|
|
|
name: slurmctld
|
|
|
|
|
|
|
|
- name: Make sure slurmdbd service unit is started
|
|
|
|
systemd_service:
|
|
|
|
enabled: true
|
|
|
|
state: started
|
|
|
|
name: slurmdbd
|