Standardize tests inventory
The config for tests inventory is based on the keystone configuration. Change-Id: I95d4ff54b36ee1b055d6ffc86975c277d906f6c7
This commit is contained in:
parent
8bf2716a53
commit
596f76901b
@ -1,8 +1,8 @@
|
||||
[all]
|
||||
localhost ansible_become=True
|
||||
infra1 ansible_host=10.100.100.2 ansible_become=True ansible_user=root
|
||||
keystone1 ansible_host=10.100.100.3 ansible_become=True ansible_user=root
|
||||
horizon1 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
|
||||
keystone1 ansible_host=10.1.0.3 ansible_become=True ansible_user=root
|
||||
horizon1 ansible_host=10.1.0.4 ansible_become=True ansible_user=root
|
||||
|
||||
[all_containers]
|
||||
infra1
|
||||
|
@ -17,7 +17,7 @@ horizon_developer_mode: true
|
||||
horizon_venv_tag: "testing"
|
||||
horizon_git_install_branch: master
|
||||
horizon_requirements_git_install_branch: master
|
||||
horizon_galera_address: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
horizon_galera_address: "{{ test_galera_host }}"
|
||||
horizon_galera_database: dash
|
||||
horizon_galera_user: dash
|
||||
horizon_rabbitmq_password: "secrete"
|
||||
|
@ -18,31 +18,10 @@
|
||||
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: "{{ horizon_galera_database }}"
|
||||
state: "present"
|
||||
when: inventory_hostname == groups['horizon_all'][0]
|
||||
delegate_to: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
- 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: "{{ horizon_galera_database }}"
|
||||
password: "{{ horizon_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ horizon_galera_database }}.*:ALL"
|
||||
with_items:
|
||||
- "localhost"
|
||||
- "%"
|
||||
when: inventory_hostname == groups['horizon_all'][0]
|
||||
delegate_to: "{{ hostvars[groups['galera_all'][0]]['ansible_host'] }}"
|
||||
- include: common/create-grant-db.yml
|
||||
db_name: "{{ horizon_galera_database }}"
|
||||
db_password: "{{ horizon_container_mysql_password }}"
|
||||
roles:
|
||||
- role: "os_horizon"
|
||||
- role: "{{ horizon_rolename | default('os_horizon') }}"
|
||||
vars_files:
|
||||
- common/test-vars.yml
|
||||
|
Loading…
Reference in New Issue
Block a user