19 lines
512 B
SYSTEMD
19 lines
512 B
SYSTEMD
|
[Unit]
|
||
|
Description=Openstack Glance Container
|
||
|
After=docker.service
|
||
|
Requires=docker.service
|
||
|
|
||
|
[Service]
|
||
|
TimeoutStartSec=0
|
||
|
Restart=always
|
||
|
ExecStartPre=-/usr/bin/docker stop %n
|
||
|
ExecStartPre=-/usr/bin/docker rm %n
|
||
|
ExecStart=/usr/bin/docker run --name %n \
|
||
|
-e "MEMCACHED_SERVER={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}" \
|
||
|
-e "OPENSTACK_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}" \
|
||
|
-p 80:80 \
|
||
|
hpc/horizon
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|