Remove rally_host_group variable
It was duplicating the meaning/purpose of the role variable `rally_role_project_group` Also ensure that additional tasks are limited to only a single host in the host group. Change-Id: I3d5cc822cc0d3c2b0b3ba7b05a9fe1b6b9e3a839
This commit is contained in:
parent
0c26304c64
commit
c0698d207b
@ -54,13 +54,11 @@ rally_pip_packages:
|
|||||||
- pymysql
|
- pymysql
|
||||||
- rally
|
- rally
|
||||||
|
|
||||||
|
# The inventory group where Rally will be installed.
|
||||||
# This variable is used by the repo_build process to determine
|
# This variable is used by the repo_build process to determine
|
||||||
# which host group to check for members of before building the
|
# which host group to check for members of before building the
|
||||||
# pip packages required by this role. The value is picked up
|
# pip packages required by this role. The value is picked up
|
||||||
# by the py_pkgs lookup.
|
# by the py_pkgs lookup.
|
||||||
rally_role_project_group: utility_all
|
rally_role_project_group: utility_all
|
||||||
|
|
||||||
# The inventory group where Rally will be installed
|
|
||||||
rally_host_group: rally_all
|
|
||||||
|
|
||||||
rally_config_overrides: {}
|
rally_config_overrides: {}
|
||||||
|
@ -22,3 +22,16 @@
|
|||||||
command: "{{ rally_bin }}/rally-manage db create"
|
command: "{{ rally_bin }}/rally-manage db create"
|
||||||
when:
|
when:
|
||||||
- rally_deployment_list_result.stdout | search("Table 'rally.deployments' doesn't exist")
|
- rally_deployment_list_result.stdout | search("Table 'rally.deployments' doesn't exist")
|
||||||
|
|
||||||
|
- name: Check for existing Rally deployment
|
||||||
|
command: "{{ rally_bin }}/rally deployment list"
|
||||||
|
ignore_errors: true
|
||||||
|
register: rally_deployment_list_result
|
||||||
|
|
||||||
|
- name: Setup the Rally deployment
|
||||||
|
shell: |
|
||||||
|
. /root/openrc
|
||||||
|
. {{ rally_bin }}/activate
|
||||||
|
{{ rally_bin }}/rally deployment create --fromenv --name=existing
|
||||||
|
when:
|
||||||
|
- rally_deployment_list_result.stdout | search("There are no deployments")
|
||||||
|
@ -37,6 +37,6 @@
|
|||||||
|
|
||||||
- include: database-setup.yml
|
- include: database-setup.yml
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups[rally_host_group][0]
|
- inventory_hostname == groups[rally_role_project_group][0]
|
||||||
tags:
|
tags:
|
||||||
- rally-install
|
- rally-install
|
||||||
|
@ -22,15 +22,3 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
config_overrides: "{{ rally_config_overrides }}"
|
config_overrides: "{{ rally_config_overrides }}"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
|
|
||||||
- name: Check for existing Rally deployment
|
|
||||||
command: "{{ rally_bin }}/rally deployment list"
|
|
||||||
ignore_errors: true
|
|
||||||
register: rally_deployment_list_result
|
|
||||||
|
|
||||||
- name: Setup the Rally deployment
|
|
||||||
shell: |
|
|
||||||
. /root/openrc
|
|
||||||
{{ rally_bin }}/rally deployment create --fromenv --name=existing
|
|
||||||
when:
|
|
||||||
- rally_deployment_list_result.stdout | search("There are no deployments")
|
|
||||||
|
@ -20,5 +20,5 @@ galera_all
|
|||||||
[keystone_all]
|
[keystone_all]
|
||||||
infra1
|
infra1
|
||||||
|
|
||||||
[rally_all]
|
[utility_all]
|
||||||
openstack1
|
openstack1
|
@ -14,15 +14,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Run a Rally scenario to ensure proper install/config
|
- name: Run a Rally scenario to ensure proper install/config
|
||||||
hosts: rally_all
|
hosts: utility_all
|
||||||
user: root
|
user: root
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create the deployment
|
|
||||||
shell: |
|
|
||||||
. /root/openrc
|
|
||||||
. {{ rally_bin }}/activate
|
|
||||||
{{ rally_bin }}/rally deployment create --fromenv --name=existing
|
|
||||||
- name: Copy the rally scenario
|
- name: Copy the rally scenario
|
||||||
copy:
|
copy:
|
||||||
src: "{{ playbook_dir }}/files/scenario.json"
|
src: "{{ playbook_dir }}/files/scenario.json"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Deploy Rally
|
- name: Deploy Rally
|
||||||
hosts: rally_all
|
hosts: utility_all
|
||||||
user: root
|
user: root
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
@ -26,7 +26,7 @@
|
|||||||
name: "{{ rally_galera_database }}"
|
name: "{{ rally_galera_database }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
delegate_to: "10.100.100.2"
|
delegate_to: "10.100.100.2"
|
||||||
when: inventory_hostname == groups['rally_all'][0]
|
when: inventory_hostname == groups['utility_all'][0]
|
||||||
- name: Grant access to the DB for the service
|
- name: Grant access to the DB for the service
|
||||||
mysql_user:
|
mysql_user:
|
||||||
login_user: "root"
|
login_user: "root"
|
||||||
@ -41,7 +41,7 @@
|
|||||||
- "localhost"
|
- "localhost"
|
||||||
- "%"
|
- "%"
|
||||||
delegate_to: "10.100.100.2"
|
delegate_to: "10.100.100.2"
|
||||||
when: inventory_hostname == groups['rally_all'][0]
|
when: inventory_hostname == groups['utility_all'][0]
|
||||||
roles:
|
roles:
|
||||||
- role: "{{ rolename | basename }}"
|
- role: "{{ rolename | basename }}"
|
||||||
vars_files:
|
vars_files:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user