You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
920 B

# Build and install a docker image for glance.
---
- name: Make build and persistent directories
file:
path: "{{ item }}"
state: directory
mode: 0777
with_items:
- /srv/glance
## Todo: remove this when we have a docker repo
#- name: clone docker-glance repo
# git:
# accept_hostkey: True
# repo: ssh://git@git.webhosting.rug.nl:222/P256174/docker-glance.git
# dest: /srv/glance
- name: build glance image
docker_image:
path: /srv/glance
name: hpc/openstack-glance
- name: install service file.
template:
src: templates/glance.service
dest: /etc/systemd/system/glance.service
mode: 644
owner: root
group: root
- command: systemctl daemon-reload
- name: Initialize database.
command: docke run --rm hpc/openstack-glance /etc/bootstrap.sh
tags: bootstrap
- name: make sure service is started
systemd:
name: glance.service
state: restarted