2015-02-14 10:06:50 -06:00
|
|
|
---
|
|
|
|
# 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.
|
|
|
|
|
2016-05-20 14:56:11 -04:00
|
|
|
- name: Gather variables for each operating system
|
2022-01-12 08:32:22 +00:00
|
|
|
include_vars: "{{ lookup('first_found', params) }}"
|
|
|
|
vars:
|
|
|
|
params:
|
|
|
|
files:
|
|
|
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
|
|
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
|
|
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
|
|
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
|
|
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
|
|
|
paths:
|
|
|
|
- "{{ role_path }}/vars"
|
2016-05-20 14:56:11 -04:00
|
|
|
tags:
|
|
|
|
- always
|
|
|
|
|
2018-07-18 09:54:35 +01:00
|
|
|
- name: Fail if service was deployed using a different installation method
|
|
|
|
fail:
|
|
|
|
msg: "Switching installation methods for OpenStack services is not supported"
|
|
|
|
when:
|
|
|
|
- ansible_local is defined
|
|
|
|
- ansible_local.openstack_ansible is defined
|
|
|
|
- ansible_local.openstack_ansible.horizon is defined
|
|
|
|
- ansible_local.openstack_ansible.horizon.install_method is defined
|
|
|
|
- ansible_local.openstack_ansible.horizon.install_method != horizon_install_method
|
|
|
|
|
|
|
|
- name: Gather variables for installation method
|
|
|
|
include_vars: "{{ horizon_install_method }}_install.yml"
|
|
|
|
tags:
|
|
|
|
- always
|
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing horizon_pre_install tasks
|
|
|
|
import_tasks: horizon_pre_install.yml
|
2016-07-11 12:04:29 -04:00
|
|
|
tags:
|
|
|
|
- horizon-install
|
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing horizon_install tasks
|
|
|
|
import_tasks: horizon_install.yml
|
2016-07-11 12:04:29 -04:00
|
|
|
tags:
|
|
|
|
- horizon-install
|
|
|
|
|
2023-04-04 23:20:27 +02:00
|
|
|
- name: Create and install SSL certificates
|
|
|
|
include_role:
|
|
|
|
name: pki
|
|
|
|
tasks_from: main_certs.yml
|
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- horizon-config
|
|
|
|
- pki
|
|
|
|
vars:
|
|
|
|
pki_setup_host: "{{ horizon_pki_setup_host }}"
|
|
|
|
pki_dir: "{{ horizon_pki_dir }}"
|
|
|
|
pki_create_certificates: "{{ horizon_user_ssl_cert is not defined and horizon_user_ssl_key is not defined }}"
|
|
|
|
pki_regen_cert: "{{ horizon_pki_regen_cert }}"
|
|
|
|
pki_certificates: "{{ horizon_pki_certificates }}"
|
|
|
|
pki_install_certificates: "{{ horizon_pki_install_certificates }}"
|
2018-10-04 09:06:38 -05:00
|
|
|
when:
|
2023-04-04 23:20:27 +02:00
|
|
|
- horizon_backend_ssl
|
2016-07-11 12:04:29 -04:00
|
|
|
tags:
|
2023-04-04 23:20:27 +02:00
|
|
|
- always
|
2015-02-14 10:06:50 -06:00
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing horizon_post_install tasks
|
|
|
|
import_tasks: horizon_post_install.yml
|
2016-07-11 23:39:20 -05:00
|
|
|
tags:
|
2017-01-10 15:26:05 +00:00
|
|
|
- horizon-config
|
2024-05-15 09:09:14 +01:00
|
|
|
- post-install
|
2016-07-11 23:39:20 -05:00
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing horizon_service_setup tasks
|
|
|
|
import_tasks: horizon_service_setup.yml
|
2020-04-13 15:16:25 +03:00
|
|
|
when:
|
|
|
|
- ('horizon_all' in group_names)
|
|
|
|
- inventory_hostname == groups['horizon_all'][0]
|
2016-07-11 12:04:29 -04:00
|
|
|
tags:
|
2017-01-10 15:26:05 +00:00
|
|
|
- horizon-config
|
2015-07-15 12:07:08 -05:00
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing uwsgi/apache tasks
|
|
|
|
import_tasks: "{{ (horizon_use_uwsgi | bool) | ternary('horizon_uwsgi.yml', 'horizon_apache.yml') }}"
|
2016-07-11 12:04:29 -04:00
|
|
|
tags:
|
|
|
|
- horizon-config
|
2015-02-14 10:06:50 -06:00
|
|
|
|
2023-07-17 10:25:45 +02:00
|
|
|
- name: Importing horizon_translations_update tasks
|
|
|
|
import_tasks: horizon_translations_update.yml
|
2017-06-08 16:20:29 +01:00
|
|
|
when: horizon_translations_update | bool
|
|
|
|
tags:
|
2017-07-10 12:25:15 +01:00
|
|
|
- horizon-config
|
2017-09-13 13:37:37 -06:00
|
|
|
- horizon-translations
|
2017-06-08 16:20:29 +01:00
|
|
|
|
2015-02-14 10:06:50 -06:00
|
|
|
- name: Flush handlers
|
|
|
|
meta: flush_handlers
|