Standardize tests inventory
The config for tests inventory is based on the keystone configuration. Change-Id: I067280d71c5bbe3885bc0ec98c47616f05fb1a7a
This commit is contained in:
parent
e12092e094
commit
74074a1c8c
@ -18,9 +18,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:
|
||||
|
@ -1,8 +1,7 @@
|
||||
[all]
|
||||
localhost ansible_become=True
|
||||
infra1 ansible_host=10.100.100.2 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
|
||||
openstack1 ansible_host=10.100.100.3 ansible_host=10.100.100.3 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
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
@ -41,4 +40,4 @@ openstack1
|
||||
openstack1
|
||||
|
||||
[aodh_listener]
|
||||
openstack1
|
||||
openstack1
|
||||
|
@ -14,8 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
aodh_container_db_password: "secrete"
|
||||
aodh_db_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
aodh_db_address: "{{ test_galera_host }}"
|
||||
aodh_database_name: aodh
|
||||
aodh_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
aodh_rabbitmq_password: "secrete"
|
||||
aodh_rabbitmq_userid: aodh
|
||||
aodh_rabbitmq_vhost: /aodh
|
||||
|
@ -18,48 +18,14 @@
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Ensure rabbitmq vhost
|
||||
rabbitmq_vhost:
|
||||
name: "{{ aodh_rabbitmq_vhost }}"
|
||||
state: "present"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['aodh_all'][0]
|
||||
- name: Ensure rabbitmq user
|
||||
rabbitmq_user:
|
||||
user: "{{ aodh_rabbitmq_userid }}"
|
||||
password: "{{ aodh_rabbitmq_password }}"
|
||||
vhost: "{{ aodh_rabbitmq_vhost }}"
|
||||
configure_priv: ".*"
|
||||
read_priv: ".*"
|
||||
write_priv: ".*"
|
||||
state: "present"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['aodh_all'][0]
|
||||
- name: Create DB for service
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ aodh_database_name }}"
|
||||
state: "present"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['aodh_all'][0]
|
||||
- name: Grant access to the DB for the service
|
||||
mysql_user:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
name: "{{ aodh_database_name }}"
|
||||
password: "{{ aodh_container_db_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ aodh_database_name }}.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['aodh_all'][0]
|
||||
- include: common/ensure-rabbitmq.yml
|
||||
vhost_name: "{{ aodh_rabbitmq_vhost }}"
|
||||
user_name: "{{ aodh_rabbitmq_userid }}"
|
||||
user_password: "{{ aodh_rabbitmq_password }}"
|
||||
- include: common/create-grant-db.yml
|
||||
db_name: "{{ aodh_database_name }}"
|
||||
db_password: "{{ aodh_container_db_password }}"
|
||||
roles:
|
||||
- role: "os_aodh"
|
||||
- role: "{{ aodh_rolename | default('os_aodh') }}"
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
|
Loading…
Reference in New Issue
Block a user