With update of ansible-lint to version >=6.0.0 a lot of new linters were added, that enabled by default. In order to comply with linter rules we're applying changes to the role. With that we also update metdata to reflect current state. Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223 Change-Id: I9aaf6680c274453a16b6f9879cf488ae2050e71f
191 lines
6.4 KiB
YAML
191 lines
6.4 KiB
YAML
---
|
|
# (C)2016 Brocade Communications Systems, Inc.
|
|
# 130 Holger Way, San Jose, CA 95134.
|
|
# All rights reserved.
|
|
#
|
|
# 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: "{{ 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"
|
|
tags:
|
|
- always
|
|
|
|
- name: Including osa.db_setup role
|
|
include_role:
|
|
name: openstack.osa.db_setup
|
|
apply:
|
|
tags:
|
|
- common-db
|
|
- tacker-config
|
|
when:
|
|
- _tacker_is_first_play_host
|
|
vars:
|
|
_oslodb_setup_host: "{{ tacker_db_setup_host }}"
|
|
_oslodb_ansible_python_interpreter: "{{ tacker_db_setup_python_interpreter }}"
|
|
_oslodb_setup_endpoint: "{{ tacker_galera_address }}"
|
|
_oslodb_setup_port: "{{ tacker_galera_port }}"
|
|
_oslodb_databases:
|
|
- name: "{{ tacker_galera_database }}"
|
|
users:
|
|
- username: "{{ tacker_galera_user }}"
|
|
password: "{{ tacker_container_mysql_password }}"
|
|
tags:
|
|
- always
|
|
|
|
- name: Including osa.mq_setup role
|
|
include_role:
|
|
name: openstack.osa.mq_setup
|
|
apply:
|
|
tags:
|
|
- common-mq
|
|
- tacker-config
|
|
when:
|
|
- _tacker_is_first_play_host
|
|
vars:
|
|
_oslomsg_rpc_setup_host: "{{ tacker_oslomsg_rpc_setup_host }}"
|
|
_oslomsg_rpc_userid: "{{ tacker_oslomsg_rpc_userid }}"
|
|
_oslomsg_rpc_password: "{{ tacker_oslomsg_rpc_password }}"
|
|
_oslomsg_rpc_vhost: "{{ tacker_oslomsg_rpc_vhost }}"
|
|
_oslomsg_rpc_transport: "{{ tacker_oslomsg_rpc_transport }}"
|
|
_oslomsg_notify_setup_host: "{{ tacker_oslomsg_notify_setup_host }}"
|
|
_oslomsg_notify_userid: "{{ tacker_oslomsg_notify_userid }}"
|
|
_oslomsg_notify_password: "{{ tacker_oslomsg_notify_password }}"
|
|
_oslomsg_notify_vhost: "{{ tacker_oslomsg_notify_vhost }}"
|
|
_oslomsg_notify_transport: "{{ tacker_oslomsg_notify_transport }}"
|
|
tags:
|
|
- always
|
|
|
|
- name: Importing tacker_pre_install tasks
|
|
import_tasks: tacker_pre_install.yml
|
|
tags:
|
|
- tacker-install
|
|
|
|
- name: Create and install SSL certificates
|
|
include_role:
|
|
name: pki
|
|
tasks_from: main_certs.yml
|
|
apply:
|
|
tags:
|
|
- tacker-config
|
|
- pki
|
|
vars:
|
|
pki_setup_host: "{{ tacker_pki_setup_host }}"
|
|
pki_dir: "{{ tacker_pki_dir }}"
|
|
pki_create_certificates: "{{ tacker_user_ssl_cert is not defined and tacker_user_ssl_key is not defined }}"
|
|
pki_regen_cert: "{{ tacker_pki_regen_cert }}"
|
|
pki_certificates: "{{ tacker_pki_certificates }}"
|
|
pki_install_certificates: "{{ tacker_pki_install_certificates }}"
|
|
when:
|
|
- tacker_backend_ssl
|
|
tags:
|
|
- always
|
|
|
|
- name: Install the python venv
|
|
import_role:
|
|
name: "python_venv_build"
|
|
vars:
|
|
venv_python_executable: "{{ tacker_venv_python_executable }}"
|
|
venv_build_constraints: "{{ tacker_git_constraints }}"
|
|
venv_install_destination_path: "{{ tacker_bin | dirname }}"
|
|
venv_install_distro_package_list: "{{ tacker_distro_packages }}"
|
|
venv_pip_install_args: "{{ tacker_pip_install_args }}"
|
|
venv_pip_packages: "{{ tacker_pip_packages | union((tacker_oslomsg_amqp1_enabled | bool) | ternary(tacker_optional_oslomsg_amqp1_pip_packages, [])) }}"
|
|
venv_facts_when_changed:
|
|
- section: "tacker"
|
|
option: "venv_tag"
|
|
value: "{{ tacker_venv_tag }}"
|
|
tags:
|
|
- tacker-install
|
|
|
|
- name: Importing tacker_post_install tasks
|
|
import_tasks: tacker_post_install.yml
|
|
tags:
|
|
- tacker-install
|
|
- tacker-config
|
|
|
|
- name: Run the systemd service role
|
|
import_role:
|
|
name: systemd_service
|
|
vars:
|
|
systemd_user_name: "{{ tacker_system_user_name }}"
|
|
systemd_group_name: "{{ tacker_system_group_name }}"
|
|
systemd_tempd_prefix: openstack
|
|
systemd_slice_name: tacker
|
|
systemd_lock_path: /var/lock/tacker
|
|
systemd_service_cpu_accounting: true
|
|
systemd_service_block_io_accounting: true
|
|
systemd_service_memory_accounting: true
|
|
systemd_service_tasks_accounting: true
|
|
systemd_services: "{{ tacker_services.values() }}"
|
|
tags:
|
|
- systemd-service
|
|
- tacker-install
|
|
- tacker-config
|
|
|
|
- name: Importing tacker_db_sync tasks
|
|
import_tasks: tacker_db_sync.yml
|
|
when:
|
|
- _tacker_is_first_play_host
|
|
tags:
|
|
- tacker-install
|
|
|
|
- name: Including osa.service_setup role
|
|
include_role:
|
|
name: openstack.osa.service_setup
|
|
apply:
|
|
tags:
|
|
- common-service
|
|
- tacker-config
|
|
vars:
|
|
_service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}"
|
|
_service_in_ldap: "{{ tacker_service_in_ldap }}"
|
|
_service_setup_host: "{{ tacker_service_setup_host }}"
|
|
_service_setup_host_python_interpreter: "{{ tacker_service_setup_host_python_interpreter }}"
|
|
_service_project_name: "{{ tacker_service_project_name }}"
|
|
_service_region: "{{ tacker_service_region }}"
|
|
_service_users:
|
|
- name: "{{ tacker_service_user_name }}"
|
|
password: "{{ tacker_service_password }}"
|
|
role: "{{ tacker_service_role_names }}"
|
|
_service_endpoints:
|
|
- service: "{{ tacker_service_name }}"
|
|
interface: "public"
|
|
url: "{{ tacker_service_publicurl }}"
|
|
- service: "{{ tacker_service_name }}"
|
|
interface: "internal"
|
|
url: "{{ tacker_service_internalurl }}"
|
|
- service: "{{ tacker_service_name }}"
|
|
interface: "admin"
|
|
url: "{{ tacker_service_adminurl }}"
|
|
_service_catalog:
|
|
- name: "{{ tacker_service_name }}"
|
|
type: "{{ tacker_service_type }}"
|
|
description: "{{ tacker_service_description }}"
|
|
when:
|
|
- _tacker_is_first_play_host
|
|
tags:
|
|
- always
|
|
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|