Made rabbitmq hostnames variable
This commit is contained in:
parent
d9f6028848
commit
ef2360f814
@ -10,7 +10,9 @@ ExecStartPre=-/usr/bin/docker stop %n
|
|||||||
ExecStartPre=-/usr/bin/docker rm %n
|
ExecStartPre=-/usr/bin/docker rm %n
|
||||||
ExecStartPre=/usr/bin/docker pull rabbitmq:latest
|
ExecStartPre=/usr/bin/docker pull rabbitmq:latest
|
||||||
ExecStart=/usr/bin/docker run \
|
ExecStart=/usr/bin/docker run \
|
||||||
--add-host ansible-test:172.23.38.125 --add-host ansible-test-2:172.23.38.127 --add-host ansible-test-3:172.23.38.128 \
|
--add-host {{ hostvars[groups['rabbitmq'][0]]['ansible_hostname'] }}:{{ hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address'] }} \
|
||||||
|
--add-host {{ hostvars[groups['rabbitmq'][1]]['ansible_hostname'] }}:{{ hostvars[groups['rabbitmq'][1]]['ansible_default_ipv4']['address'] }} \
|
||||||
|
--add-host {{ hostvars[groups['rabbitmq'][2]]['ansible_hostname'] }}:{{ hostvars[groups['rabbitmq'][2]]['ansible_default_ipv4']['address'] }} \
|
||||||
-p 4369:4369 -p 25679:25679 -p 25672:25672 -p 5671-5672:5671-5672 -p 8080:15672 \
|
-p 4369:4369 -p 25679:25679 -p 25672:25672 -p 5671-5672:5671-5672 -p 8080:15672 \
|
||||||
-e "RABBITMQ_DEFAULT_USER=user" -e "RABBITMQ_DEFAULT_PASS=password" \
|
-e "RABBITMQ_DEFAULT_USER=user" -e "RABBITMQ_DEFAULT_PASS=password" \
|
||||||
-e "RABBITMQ_ERLANG_COOKIE=IHyW9HpfbXRL+pZkhGd8pA==" \
|
-e "RABBITMQ_ERLANG_COOKIE=IHyW9HpfbXRL+pZkhGd8pA==" \
|
||||||
|
Loading…
Reference in New Issue
Block a user