networking

This commit is contained in:
2021-04-20 14:38:51 +02:00
parent 35301c94e5
commit 851d971060

View File

@@ -78,15 +78,27 @@
dest: "/container/volumes/{{item}}/"
with_items: [ "cm", "exec", "sub"]
- name: "create docker network to make service discovery work"
docker_network:
name: condor
state: present
- name: "run htcondor containers"
docker_container:
name: "condor-cm"
name: "condor-{{item}}"
hostname: "condor-{{item}}"
domainname: "htc.local"
image: htcondor
state: started
detach: True
cleanup: True
networks_cli_compatible: True
networks:
- name: "condor"
aliases: [ "condor-{{item}}.htc.local" ]
volumes:
- "/container/volumes/cm/:/etc/condor/:rw"
- "/container/volumes/{{item}}/:/etc/condor/:rw"
with_items: [ "cm", "exec", "sub"]
# auto_remove: True
# mounts:
# src: /container/volumes/cm/