
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: I558a0fee0b0bf8c86f5bd73dca2b9571f3e4e287
173 lines
5.7 KiB
YAML
173 lines
5.7 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# (C) 2016 Michael Rice <michael.rice@rackspace.com>
|
|
#
|
|
# 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
|
|
- adjutant-config
|
|
when: _adjutant_is_first_play_host
|
|
vars:
|
|
_oslodb_setup_host: "{{ adjutant_galera_setup_host }}"
|
|
_oslodb_ansible_python_interpreter: "{{ adjutant_galera_setup_python_interpreter }}"
|
|
_oslodb_setup_endpoint: "{{ adjutant_galera_address }}"
|
|
_oslodb_setup_port: "{{ adjutant_galera_port }}"
|
|
_oslodb_databases:
|
|
- name: "{{ adjutant_galera_database }}"
|
|
users:
|
|
- username: "{{ adjutant_galera_user }}"
|
|
password: "{{ adjutant_galera_password }}"
|
|
tags:
|
|
- always
|
|
|
|
- name: Importing adjutant_pre_install tasks
|
|
import_tasks: adjutant_pre_install.yml
|
|
tags:
|
|
- adjutant-install
|
|
|
|
- name: Importing adjutant_install tasks
|
|
import_tasks: adjutant_install.yml
|
|
tags:
|
|
- adjutant-install
|
|
|
|
- name: Create and install SSL certificates
|
|
include_role:
|
|
name: pki
|
|
tasks_from: main_certs.yml
|
|
apply:
|
|
tags:
|
|
- adjutant-config
|
|
- pki
|
|
vars:
|
|
pki_setup_host: "{{ adjutant_pki_setup_host }}"
|
|
pki_dir: "{{ adjutant_pki_dir }}"
|
|
pki_create_certificates: "{{ adjutant_user_ssl_cert is not defined and adjutant_user_ssl_key is not defined }}"
|
|
pki_regen_cert: "{{ adjutant_pki_regen_cert }}"
|
|
pki_certificates: "{{ adjutant_pki_certificates }}"
|
|
pki_install_certificates: "{{ adjutant_pki_install_certificates }}"
|
|
when:
|
|
- adjutant_backend_ssl
|
|
tags:
|
|
- always
|
|
|
|
- name: Importing adjutant_post_install tasks
|
|
import_tasks: adjutant_post_install.yml
|
|
tags:
|
|
- adjutant-config
|
|
|
|
- name: Importing adjutant_db_sync tasks
|
|
import_tasks: adjutant_db_sync.yml
|
|
when: _adjutant_is_first_play_host
|
|
tags:
|
|
- adjutant-config
|
|
|
|
- name: Including osa.service_setup role
|
|
include_role:
|
|
name: openstack.osa.service_setup
|
|
apply:
|
|
tags:
|
|
- common-service
|
|
- adjutant-config
|
|
vars:
|
|
_service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}"
|
|
_service_in_ldap: "{{ adjutant_service_in_ldap }}"
|
|
_service_setup_host: "{{ adjutant_service_setup_host }}"
|
|
_service_setup_host_python_interpreter: "{{ adjutant_service_setup_host_python_interpreter }}"
|
|
_service_project_name: "{{ adjutant_service_project_name }}"
|
|
_service_region: "{{ adjutant_service_region }}"
|
|
_service_users:
|
|
- name: "{{ adjutant_service_user_name }}"
|
|
password: "{{ adjutant_service_password }}"
|
|
role: "{{ adjutant_role_name }}"
|
|
- role: "project_mod"
|
|
- role: "project_admin"
|
|
_service_catalog:
|
|
- name: "{{ adjutant_service_name }}"
|
|
type: "{{ adjutant_service_type }}"
|
|
description: "{{ adjutant_service_description }}"
|
|
_service_endpoints:
|
|
- interface: "public"
|
|
url: "{{ adjutant_service_publicurl }}"
|
|
service: "{{ adjutant_service_name }}"
|
|
- interface: "internal"
|
|
url: "{{ adjutant_service_internalurl }}"
|
|
service: "{{ adjutant_service_name }}"
|
|
- interface: "admin"
|
|
url: "{{ adjutant_service_adminurl }}"
|
|
service: "{{ adjutant_service_name }}"
|
|
when: _adjutant_is_first_play_host
|
|
tags:
|
|
- always
|
|
|
|
- name: Run the systemd service role
|
|
include_role:
|
|
name: systemd_service
|
|
vars:
|
|
systemd_user_name: "{{ adjutant_system_user_name }}"
|
|
systemd_group_name: "{{ adjutant_system_group_name }}"
|
|
systemd_tempd_prefix: openstack
|
|
systemd_slice_name: adjutant
|
|
systemd_lock_path: /var/lock/adjutant
|
|
systemd_service_cpu_accounting: true
|
|
systemd_service_block_io_accounting: true
|
|
systemd_memory_accounting: true
|
|
systemd_tasks_accounting: true
|
|
systemd_services:
|
|
- service_name: "{{ service_var.service_name }}"
|
|
enabled: "{{ service_var.enabled | default(True) }}"
|
|
state: "{{ service_var.state | default('started') }}"
|
|
execstarts: "{{ service_var.execstarts }}"
|
|
execreloads: "{{ service_var.execreloads | default([]) }}"
|
|
config_overrides: "{{ service_var.init_config_overrides }}"
|
|
with_items: "{{ filtered_adjutant_services }}"
|
|
loop_control:
|
|
loop_var: service_var
|
|
tags:
|
|
- adjutant-config
|
|
- systemd-service
|
|
|
|
- name: Import uwsgi role
|
|
import_role:
|
|
name: uwsgi
|
|
vars:
|
|
uwsgi_services: "{{ uwsgi_adjutant_services }}"
|
|
uwsgi_install_method: "source"
|
|
tags:
|
|
- adjutant-install
|
|
- adjutant-config
|
|
- uwsgi
|
|
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|