replaced hardcoded ips with env vars
This commit is contained in:
@ -8,18 +8,6 @@
|
||||
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
|
||||
@ -31,7 +19,16 @@
|
||||
- command: systemctl daemon-reload
|
||||
|
||||
- name: Initialize database.
|
||||
command: docke run --rm hpc/openstack-glance /etc/bootstrap.sh
|
||||
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_PASSWORD=geheim"
|
||||
hpc/openstack-glance /etc/bootstrap.sh
|
||||
tags: bootstrap
|
||||
|
||||
- name: make sure service is started
|
||||
|
Reference in New Issue
Block a user