option for docker host access to cluster

This commit is contained in:
2021-06-28 17:51:45 +02:00
parent 74a760cf98
commit 1a952a4e7a
3 changed files with 43 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
- 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
state: started