Merge "Fix linters and metadata"

This commit is contained in:
Zuul 2023-08-22 17:31:58 +00:00 committed by Gerrit Code Review
commit 6b748386f4
5 changed files with 49 additions and 27 deletions

View File

@ -20,7 +20,11 @@ debug: False
# for the service setup. The host must already have # for the service setup. The host must already have
# clouds.yaml properly configured. # clouds.yaml properly configured.
masakari_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}" masakari_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
masakari_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((masakari_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}" masakari_service_setup_host_python_interpreter: >-
{{
openstack_service_setup_host_python_interpreter | default(
(masakari_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']))
}}
masakari_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}" masakari_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
# Set the package install state for distribution packages # Set the package install state for distribution packages
@ -31,7 +35,8 @@ masakari_git_repo: https://opendev.org/openstack/masakari
masakari_monitors_git_repo: https://opendev.org/openstack/masakari-monitors masakari_monitors_git_repo: https://opendev.org/openstack/masakari-monitors
masakari_git_install_branch: master masakari_git_install_branch: master
masakari_monitors_git_install_branch: master masakari_monitors_git_install_branch: master
masakari_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}" masakari_upper_constraints_url: >-
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
masakari_git_constraints: masakari_git_constraints:
- "--constraint {{ masakari_upper_constraints_url }}" - "--constraint {{ masakari_upper_constraints_url }}"
@ -44,7 +49,11 @@ masakari_system_user_home: "/var/lib/{{ masakari_system_user_name }}"
## Database credentials ## Database credentials
masakari_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}" masakari_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
masakari_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((masakari_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}" masakari_db_setup_python_interpreter: >-
{{
openstack_db_setup_python_interpreter | default(
(masakari_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
}}
masakari_galera_address: "{{ galera_address | default('127.0.0.1') }}" masakari_galera_address: "{{ galera_address | default('127.0.0.1') }}"
masakari_galera_database: masakari masakari_galera_database: masakari
masakari_galera_user: masakari masakari_galera_user: masakari
@ -187,7 +196,8 @@ masakari_oslomsg_rpc_ssl_ca_file: "{{ oslomsg_rpc_ssl_ca_file | default('') }}"
# Notify # Notify
masakari_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}" masakari_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
masakari_oslomsg_notify_setup_host: "{{ (masakari_oslomsg_notify_host_group in groups) | ternary(groups[masakari_oslomsg_notify_host_group][0], 'localhost') }}" masakari_oslomsg_notify_setup_host: >-
{{ (masakari_oslomsg_notify_host_group in groups) | ternary(groups[masakari_oslomsg_notify_host_group][0], 'localhost') }}
masakari_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}" masakari_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
masakari_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}" masakari_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
masakari_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}" masakari_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
@ -255,5 +265,5 @@ masakari_pki_install_certificates:
mode: "0600" mode: "0600"
# Define user-provided SSL certificates # Define user-provided SSL certificates
#masakari_user_ssl_cert: <path to cert on ansible deployment host> # masakari_user_ssl_cert: <path to cert on ansible deployment host>
#masakari_user_ssl_key: <path to cert on ansible deployment host> # masakari_user_ssl_key: <path to cert on ansible deployment host>

View File

@ -18,19 +18,21 @@ galaxy_info:
description: Installation and setup of masakari description: Installation and setup of masakari
company: NTT DATA company: NTT DATA
license: Apache2 license: Apache2
min_ansible_version: 2.2 role_name: os_masakari
namespace: openstack
min_ansible_version: "2.10"
platforms: platforms:
- name: Debian - name: Debian
versions: versions:
- buster - bullseye
- name: Ubuntu - name: Ubuntu
versions: versions:
- bionic
- focal - focal
- jammy
- name: EL - name: EL
versions: versions:
- 8 - "9"
categories: galaxy_tags:
- cloud - cloud
- python - python
- masakari - masakari

View File

@ -28,7 +28,8 @@
tags: tags:
- always - always
- include_role: - name: Including osa.db_setup role
include_role:
name: openstack.osa.db_setup name: openstack.osa.db_setup
apply: apply:
tags: tags:
@ -49,7 +50,8 @@
tags: tags:
- always - always
- include_role: - name: Including osa.mq_setup role
include_role:
name: openstack.osa.mq_setup name: openstack.osa.mq_setup
apply: apply:
tags: tags:
@ -71,7 +73,8 @@
tags: tags:
- always - always
- import_tasks: masakari_pre_install.yml - name: Importing masakari_pre_install tasks
import_tasks: masakari_pre_install.yml
tags: tags:
- masakari-install - masakari-install
@ -115,7 +118,8 @@
tags: tags:
- masakari-install - masakari-install
- import_tasks: masakari_post_install.yml - name: Importing masakari_post_install tasks
import_tasks: masakari_post_install.yml
tags: tags:
- masakari-config - masakari-config
@ -128,10 +132,10 @@
systemd_tempd_prefix: openstack systemd_tempd_prefix: openstack
systemd_slice_name: masakari systemd_slice_name: masakari
systemd_lock_path: /var/lock/masakari systemd_lock_path: /var/lock/masakari
systemd_CPUAccounting: true systemd_service_cpu_accounting: true
systemd_BlockIOAccounting: true systemd_service_block_io_accounting: true
systemd_MemoryAccounting: true systemd_service_memory_accounting: true
systemd_TasksAccounting: true systemd_service_tasks_accounting: true
systemd_services: |- systemd_services: |-
{% set services = [] %} {% set services = [] %}
{% for service in masakari_services.values() %} {% for service in masakari_services.values() %}
@ -151,11 +155,13 @@
- masakari-config - masakari-config
- systemd-service - systemd-service
- import_tasks: masakari_db_sync.yml - name: Importing masakari_db_sync tasks
import_tasks: masakari_db_sync.yml
when: when:
- "_masakari_is_first_play_host" - "_masakari_is_first_play_host"
- include_role: - name: Including osa.service_setup role
include_role:
name: openstack.osa.service_setup name: openstack.osa.service_setup
apply: apply:
tags: tags:

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: create the system group - name: Create the system group
group: group:
name: "{{ masakari_system_group_name }}" name: "{{ masakari_system_group_name }}"
gid: "{{ masakari_system_group_gid | default(omit) }}" gid: "{{ masakari_system_group_gid | default(omit) }}"
@ -35,9 +35,9 @@
file: file:
path: "{{ item.path | realpath }}" path: "{{ item.path | realpath }}"
state: directory state: directory
owner: "{{ item.owner|default(masakari_system_user_name) }}" owner: "{{ item.owner | default(masakari_system_user_name) }}"
group: "{{ item.group|default(masakari_system_group_name) }}" group: "{{ item.group | default(masakari_system_group_name) }}"
mode: "{{ item.mode|default(omit) }}" mode: "{{ item.mode | default(omit) }}"
when: item.condition | default(True) when: item.condition | default(True)
with_items: with_items:
- path: "/openstack" - path: "/openstack"

View File

@ -13,7 +13,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
_masakari_is_first_play_host: "{{ (masakari_services['masakari-api']['group'] in group_names and inventory_hostname == (groups[masakari_services['masakari-api']['group']] | intersect(ansible_play_hosts)) | first) | bool }}" _masakari_is_first_play_host: >-
{{
(masakari_services['masakari-api']['group'] in group_names and
inventory_hostname == (groups[masakari_services['masakari-api']['group']] | intersect(ansible_play_hosts)) | first) | bool
}}
masakari_pip_venv_packages: |- masakari_pip_venv_packages: |-
{% set pip_packages = [] %} {% set pip_packages = [] %}
@ -24,6 +28,6 @@ masakari_pip_venv_packages: |-
{% set _ = pip_packages.extend(masakari_monitor_pip_packages) %} {% set _ = pip_packages.extend(masakari_monitor_pip_packages) %}
{% endif %} {% endif %}
{% if masakari_oslomsg_amqp1_enabled | bool %} {% if masakari_oslomsg_amqp1_enabled | bool %}
{% set _ = pip_packages.extend(masakari_optional_oslomsg_amqp1_pip_packages) %} {% set _ = pip_packages.extend(masakari_optional_oslomsg_amqp1_pip_packages) %}
{% endif %} {% endif %}
{{ pip_packages }} {{ pip_packages }}