networking

This commit is contained in:
Thorsten Müller
2021-04-20 14:38:51 +02:00
parent 8a3ad86f8d
commit c5ee933d50

View File

@@ -58,7 +58,7 @@
- "{{pool_pw_tmp.path}}:/tmp/poolpw:ro" - "{{pool_pw_tmp.path}}:/tmp/poolpw:ro"
detach: False detach: False
cleanup: True cleanup: True
command: "condor_store_cred add -c -i /tmp/poolpw/poolpw" command: "condor_store_cred add -c -i /tmp/poolpw/poolpw"
always: always:
- name: "remove temporary password store" - name: "remove temporary password store"
@@ -78,21 +78,33 @@
dest: "/container/volumes/{{item}}/" dest: "/container/volumes/{{item}}/"
with_items: [ "cm", "exec", "sub"] with_items: [ "cm", "exec", "sub"]
- name: "create docker network to make service discovery work"
docker_network:
name: condor
state: present
- name: "run htcondor containers" - name: "run htcondor containers"
docker_container: docker_container:
name: "condor-cm" name: "condor-{{item}}"
hostname: "condor-{{item}}"
domainname: "htc.local"
image: htcondor image: htcondor
state: started state: started
detach: True detach: True
cleanup: True cleanup: True
networks_cli_compatible: True
networks:
- name: "condor"
aliases: [ "condor-{{item}}.htc.local" ]
volumes: volumes:
- "/container/volumes/cm/:/etc/condor/:rw" - "/container/volumes/{{item}}/:/etc/condor/:rw"
with_items: [ "cm", "exec", "sub"]
# auto_remove: True # auto_remove: True
# mounts: # mounts:
# src: /container/volumes/cm/ # src: /container/volumes/cm/
# dest: /etc/condor/ # dest: /etc/condor/
#- add_host: #- add_host:
# hostname: foo # hostname: foo
# ansible_connection: docker_api # ansible_connection: docker_api