openstack-ansible-os_monasca/tasks/main.yml

72 lines
2.2 KiB
YAML

---
# Copyright 2016 Internet Solutions (Pty) Ltd
#
# 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.
#
# (c) 2016 Donovan Francesco <donovan.francesco@is.co.za>
# (c) 2016 Paul Stevens <paul.stevens@is.co.za>
- 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 }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
- "{{ ansible_os_family | lower }}.yml"
tags:
- always
- include_tasks: monasca_pre_install.yml
when: inventory_hostname in groups['monasca_api']
tags:
- monasca-install
- include_tasks: monasca_install.yml
when: inventory_hostname in groups['monasca_api']
tags:
- monasca-install
- include_tasks: monasca_thresh_install.yml
when: inventory_hostname in groups['monasca_api']
tags:
- monasca-install
- include_tasks: monasca_post_install.yml
when: inventory_hostname in groups['monasca_api']
tags:
- monasca-config
- include_tasks: monasca_init_{{ ansible_service_mgr }}.yml
when: inventory_hostname in groups['monasca_api']
tags:
- monasca-config
- include_tasks: monasca_db_setup.yml
tags:
- monasca-config
- include_tasks: monasca_service_setup.yml
when: inventory_hostname == groups['monasca_api'][0]
tags:
- monasca-config
- name: Flush handlers
meta: flush_handlers
- include_tasks: monasca_alarms_setup.yml
when: inventory_hostname == groups['monasca_api'][0]
tags:
- monasca-alarms