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.
 
 

46 lines
1.3 KiB

# Build and install a docker image for nova-controller.
---
- name: Make build and persistent directories
file:
path: "{{ item }}"
state: directory
mode: 0777
with_items:
- /srv/nova-controller
# Todo: remove this when we have a docker repo
# Disabled because of https://github.com/ansible/ansible/issues/20653
#- name: clone docker-glance repo
# git:
# accept_hostkey: True
# repo: ssh://git@git.webhosting.rug.nl:222/HPC/docker-nova-service
# dest: /srv/docker-nova-service
- name: build nova-controller image
docker_image:
path: /srv/docker-nova-service
name: hpc/novacontroller
- name: install service file.
template:
src: templates/nova-controller.service
dest: /etc/systemd/system/nova-controller.service
mode: 644
owner: root
group: root
- command: systemctl daemon-reload
- name: Initialize database.
command: >
/usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
--add-host=controller:{{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}
hpc/novacontroller
/etc/bootstrap.sh
tags: bootstrap
- name: make sure service is started
systemd:
name: nova-controller.service
state: restarted