hpc-cloud/roles/glance-controller/templates/glance.service
2017-07-12 16:32:58 +02:00

24 lines
875 B
Desktop File

[Unit]
Description=Openstack Glance Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker rm -f %n
ExecStart=/usr/bin/docker run --name %n \
-e "RABBIT_HOST={{ hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address'] }}" \
-e "MEMCACHED_HOST={{ hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address'] }}" \
-e "MYSQL_HOST={{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}" \
-e "MYSQL_ROOT_PASSWORD=geheim" \
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}" \
-e "GLANCE_HOST={{ hostvars[groups['glance-controller'][0]]['ansible_default_ipv4']['address'] }}" \
-e "GLANCE_USER=glance" \
-e "GLANCE_PASSWORD=geheim" \
-p 9292:9292 \
hpc/openstack-glance
[Install]
WantedBy=multi-user.target