Files
cobald-testenv/roles/slurm/tasks/host-config.yml

36 lines
921 B
YAML

# TODO: this does not work quite right since slurm-ctl does not reach the host
# system. sinfo, scontrol etc. work but srun does not!
- name: "get addresses from docker network"
docker_network_info:
name: "{{ docker_network }}"
register: slurm_network_data
- name: link host slurm config
file:
path: "/etc/slurm/slurm.conf"
src: "/container/volumes/slurm/slurm.conf"
force: True
state: link
backup: True
- name: create slurm user
user:
name: slurm
system: True
- name: place entry of slurm-ctl in host /etc/hosts
lineinfile:
line: "{{slurm_network_data.network.Containers | dict2items
| json_query('[?value.Name==`slurm-ctl`].value.IPv4Address') | first
| ipaddr('address') }}\tslurm-ctl"
regexp: "^(\\S*)(\\s*)slurm-ctl$"
path: /etc/hosts
backup: True
- name: start munge locally
service:
name: munge
enabled: True
state: started