openstack-ansible-os_swift/tasks/main.yml
Jean-Philippe Evrard 9380862b61 Consistency for multi-os in the includes
This makes the include_vars consistent accross all the
openstack-ansible-.* repos.

Change-Id: Id3d89bb2f2364fa7d6b2850b57ebd15ef1557684
2016-06-02 14:21:08 +01:00

102 lines
2.5 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.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
- "{{ ansible_distribution | lower }}.yml"
- "{{ ansible_os_family | lower }}.yml"
tags:
- always
- 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