---
# Copyright 2016, Comcast Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Gather rally facts
  hosts: utility_all
  gather_facts: "{{ osa_gather_facts | default(True) }}"
  tags:
    - always

- name: Installation and setup of Rally
  hosts: utility_all
  gather_facts: false
  user: root
  environment: "{{ deployment_environment_variables | default({}) }}"
  vars_files:
    - "defaults/repo_packages/openstack_services.yml"
    - "defaults/{{ install_method }}_install.yml"
  tags:
    - rally
  pre_tasks:
    - name: End playbook
      meta: end_play
      when:
        - (not (rally_install | default(false)) | bool)
    - include_tasks: common-tasks/unbound-clients.yml
      when:
        - hostvars['localhost']['resolvconf_enabled'] | bool
  roles:
    - role: "os_rally"

---
# Copyright 2016, Comcast Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Gather rally facts
  hosts: utility_all[0]
  gather_facts: "{{ osa_gather_facts | default(True) }}"
  tags:
    - always

- name: Installation and setup of Rally
  hosts: utility_all[0]
  gather_facts: false
  user: root
  environment: "{{ deployment_environment_variables | default({}) }}"
  vars_files:
    - "defaults/repo_packages/openstack_services.yml"
    - "defaults/{{ install_method }}_install.yml"
  tags:
    - rally
  pre_tasks:
    - name: End playbook
      meta: end_play
      when:
        - (not (rally_install | default(false)) | bool)
    - include_tasks: common-tasks/unbound-clients.yml
      when:
        - hostvars['localhost']['resolvconf_enabled'] | bool
  roles:
    - role: "os_rally"

Install rally only on first utility container
Install rally only on first utility container

Rally should be installed only on first utility container.
We do the same for tempest.

I see no reason of having that installed on all utility containers.
Additionally, because rally does not have serial ['1', '100%'],
python_venv_build may fail due to the venv_wheel_build_skip_check[1].

[1] https://opendev.org/openstack/ansible-role-python_venv_build/src/commit/a3b3b7d7aa4751877d7227dec265f1010ce8743e/tasks/main.yml#L44

Change-Id: Ibe79c4fbcaa40b673056b0ef95c7380f9a23f747
