Andy McCrae cb73b84fb6 Limit local tasks to local hosts
We want to improve the gate speed by running the swift-role once on AIO,
since we don't need to split the sync tasks out when not using MR swift.
This means for MR swift we need to differentiate between the tasks that
should be run on remote hosts and those that should be run on local
hosts.

Change-Id: I0a8436ebbab0226f6c4fb499c938f760429aad39
2016-03-22 09:44:30 +00:00

91 lines
2.0 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# 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.
- include: swift_pre_install.yml
when:
- swift_do_setup | bool
- inventory_hostname in groups['swift_all']
tags:
- swift-setup
- include: swift_install.yml
when:
- swift_do_setup | bool
- inventory_hostname in groups['swift_all']
tags:
- swift-setup
- include: swift_post_install.yml
when:
- swift_do_setup | bool
- inventory_hostname in groups['swift_all']
tags:
- swift-setup
- include: swift_storage_hosts.yml
when:
- inventory_hostname in groups['swift_hosts']
- swift_do_setup | bool
tags:
- swift-storage-hosts
- swift-setup
- include: swift_proxy_hosts.yml
when:
- inventory_hostname in groups['swift_proxy']
- swift_do_setup | bool
tags:
- swift-storage-hosts
- swift-setup
- include: swift_service_setup.yml
when:
- inventory_hostname == groups['swift_all'][0]
- '"keystoneauth" in swift_middleware_list'
- swift_do_setup | bool
tags:
- swift-setup
- name: Flush handlers
meta: flush_handlers
tags:
- swift-setup
- include: swift_command_check.yml
when:
- swift_do_sync | bool
tags:
- swift-sync
- include: swift_key_setup.yml
when:
- swift_do_sync | bool
tags:
- swift-key
- swift-key-distribute
- swift-sync
- include: swift_rings.yml
when:
- swift_do_sync | bool
tags:
- swift-rings
- swift-sync
- include: swift_sync_post_install.yml
when:
- swift_do_sync | bool
tags:
- swift-sync-post-install
- swift-sync