replaced hardcoded ips with env vars
This commit is contained in:
parent
f5d240a7f5
commit
062fabd4b6
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
- hosts: database
|
|
||||||
become: True
|
|
||||||
roles:
|
|
||||||
- mariadb
|
|
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
- hosts: all
|
||||||
|
name: Dummy to gather facts
|
||||||
|
tasks: []
|
||||||
|
|
||||||
- hosts: glance
|
- hosts: glance
|
||||||
become: True
|
become: True
|
||||||
roles:
|
roles:
|
||||||
|
30
hosts
30
hosts
@ -1,21 +1,41 @@
|
|||||||
[databases]
|
[databases]
|
||||||
ansible-test
|
openstack01-node02
|
||||||
|
|
||||||
[keystone]
|
[keystone]
|
||||||
ansible-test
|
openstack01-node03
|
||||||
|
|
||||||
[dockerregistry]
|
[dockerregistry]
|
||||||
openstack01-node01
|
openstack01-node01
|
||||||
|
|
||||||
|
[glance]
|
||||||
|
openstack01-node02
|
||||||
|
|
||||||
|
[horizon]
|
||||||
|
kolla2
|
||||||
|
|
||||||
[rabbitmq]
|
[rabbitmq]
|
||||||
ansible-test
|
openstack01-node01
|
||||||
ansible-test-2
|
openstack01-node02
|
||||||
ansible-test-3
|
openstack01-node03
|
||||||
|
|
||||||
[cassandra]
|
[cassandra]
|
||||||
openstack01-node[01:03]
|
openstack01-node[01:03]
|
||||||
|
|
||||||
[first_cassandra]
|
[first_cassandra]
|
||||||
openstack01-node01
|
openstack01-node01
|
||||||
|
|
||||||
[next_cassandra]
|
[next_cassandra]
|
||||||
openstack01-node02
|
openstack01-node02
|
||||||
openstack01-node03
|
openstack01-node03
|
||||||
|
|
||||||
|
[memcached]
|
||||||
|
openstack01-node03
|
||||||
|
|
||||||
[first_cassandra:vars]
|
[first_cassandra:vars]
|
||||||
run_options=""
|
run_options=""
|
||||||
|
|
||||||
[next_cassandra:vars]
|
[next_cassandra:vars]
|
||||||
run_options="-e CASSANDRA_SEEDS=172.23.41.1"
|
run_options="-e CASSANDRA_SEEDS=172.23.41.1"
|
||||||
|
|
||||||
|
[nova-management]
|
||||||
|
kolla2
|
||||||
|
@ -8,18 +8,6 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- /srv/glance
|
- /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.
|
- name: install service file.
|
||||||
template:
|
template:
|
||||||
src: templates/glance.service
|
src: templates/glance.service
|
||||||
@ -31,7 +19,16 @@
|
|||||||
- command: systemctl daemon-reload
|
- command: systemctl daemon-reload
|
||||||
|
|
||||||
- name: Initialize database.
|
- 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
|
tags: bootstrap
|
||||||
|
|
||||||
- name: make sure service is started
|
- name: make sure service is started
|
||||||
|
Loading…
Reference in New Issue
Block a user