hpc-cloud/roles/glance/tasks/main.yml
Egon Rijpkema a25852b39e Removed hardcoded ips for glance
Also added domain, projects, users creation for keystone.
This guide was followed:
https://docs.openstack.org/ocata/install-guide-ubuntu/keystone-us
2017-07-12 10:19:45 +02:00

39 lines
1.3 KiB
YAML

# 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
- 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: >
docker run --rm
-e "RABBIT_HOST={{ hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address'] }}"
-e "MEMCACHED_HOST={{ hostvars[groups['memcached'][0]]['ansible_default_ipv4']['address'] }}"
-e "MYSQL_HOST={{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}"
-e "MYSQL_ROOT_PASSWORD=geheim"
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}"
-e "GLANCE_HOST={{ hostvars[groups['glance'][0]]['ansible_default_ipv4']['address'] }}"
-e "GLANCE_USER=glance"
-e "GLANCE_PASSWORD=geheim"
hpc/openstack-glance /etc/bootstrap.sh
tags: bootstrap
- name: make sure service is started
systemd:
name: glance.service
state: restarted