Tweaks to make install run idempotent

This commit is contained in:
Egon Rijpkema
2017-08-01 10:19:54 +02:00
parent 1a78f649e8
commit 8a3fbd557d
13 changed files with 50 additions and 33 deletions

View File

@ -1,8 +1,12 @@
# Build and install a docker image for nova-controller.
---
- set_fact:
docker_image: webhost12.service.rug.nl/hpc/openstack-nova-compute:latest
tags: facts
- name: pull docker image
docker_image:
name: webhost12.service.rug.nl/hpc/openstack-nova-compute:latest
name: "{{ docker_image }}"
tags: pull
- name: install service file.

View File

@ -34,7 +34,7 @@ ExecStart=/usr/bin/docker run --name %n \
-v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
-v /srv/osdisks:/var/lib/nova/instances \
--network host \
hpc/openstack-nova-compute /etc/run.sh
{{ docker_image }} /etc/run.sh
[Install]
WantedBy=multi-user.target