Standardize test environment.

Change-Id: Id31fb15b352a160c8f5139ae70966055d93f7ce6
This commit is contained in:
Marc Gariepy 2016-12-07 08:40:32 -05:00
parent 14d0edf6da
commit 1904d317d7
5 changed files with 12 additions and 33 deletions

View File

@ -17,9 +17,9 @@ container_name: "{{ inventory_hostname }}"
container_networks:
management_address:
address: "{{ ansible_host }}"
bridge: "lxcbr0"
bridge: "br-mgmt"
interface: "eth1"
netmask: "255.255.252.0"
netmask: "255.255.255.0"
type: "veth"
physical_host: localhost
properties:

View File

@ -1,3 +1,3 @@
---
external_lb_vip_address: 10.100.100.4
internal_lb_vip_address: 10.100.100.4
external_lb_vip_address: 10.1.0.4
internal_lb_vip_address: 10.1.0.4

View File

@ -1,3 +1,3 @@
---
external_lb_vip_address: 10.100.100.3
internal_lb_vip_address: 10.100.100.3
external_lb_vip_address: 10.1.0.3
internal_lb_vip_address: 10.1.0.3

View File

@ -1,8 +1,8 @@
[all]
localhost ansible_become=True
infra1 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
openstack1 ansible_host=10.100.100.3 ansible_become=True ansible_user=root
openstack2 ansible_host=10.100.100.4 ansible_become=True ansible_user=root
infra1 ansible_host=10.1.0.2 ansible_become=True ansible_user=root
openstack1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root
openstack2 ansible_host=10.1.0.4 ansible_become=True ansible_user=root
[all_containers]
infra1

View File

@ -18,30 +18,9 @@
user: root
gather_facts: true
pre_tasks:
- name: Create DB for service
mysql_db:
login_user: "{{ galera_root_user }}"
login_password: "{{ galera_root_password }}"
login_host: "localhost"
name: "gnocchi"
state: "present"
delegate_to: "{{ groups['galera_all'][0] }}"
when: inventory_hostname == groups['gnocchi_all'][0]
- name: Grant access to the DB for the service
mysql_user:
login_user: "{{ galera_root_user }}"
login_password: "{{ galera_root_password }}"
login_host: "localhost"
name: "gnocchi"
password: "{{ gnocchi_container_mysql_password }}"
host: "{{ item }}"
state: "present"
priv: "gnocchi.*:ALL"
with_items:
- "localhost"
- "%"
delegate_to: "{{ groups['galera_all'][0] }}"
when: inventory_hostname == groups['gnocchi_all'][0]
- include: common/create-grant-db.yml
db_password: "{{ gnocchi_container_mysql_password }}"
db_name: "gnocchi"
roles:
- role: "os_gnocchi"
vars_files: