18 lines
426 B
SYSTEMD
18 lines
426 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 \
|
||
|
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \
|
||
|
-p 9292:9292 \
|
||
|
hpc/openstack-glance
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|