20 lines
561 B
SYSTEMD
20 lines
561 B
SYSTEMD
|
[Unit]
|
||
|
Description=Openstack nova-controller 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'] }} \
|
||
|
--add-host=controller:{{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }} \
|
||
|
-p 8774:8774 \
|
||
|
-p 8778:8778 \
|
||
|
hpc/novacontroller /etc/run.sh
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|