hpc-cloud/roles/nova-management/tasks/main.yml
Egon Rijpkema 86cd68e465 Removed inclusion of docker everywhere
It is now included in the common role itself, which is applied to all.
2017-07-10 09:52:12 +02:00

47 lines
1.3 KiB
YAML

# 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