Fix linters and metadata

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.

Change-Id: I7ac8aabbf03cd765514f4887d10840dbd42ecef3
This commit is contained in:
Dmitriy Rabotyagov 2023-07-12 13:22:58 +02:00 committed by Dmitriy Rabotyagov
parent ed78ef112c
commit 1c5b5990da
11 changed files with 74 additions and 54 deletions

View File

@ -24,10 +24,10 @@ qdrouterd_host_group: "qdrouterd_all"
qdrouterd_service_name: "{{ _qdrouterd_service_name }}"
qdrouterd_etc_conf_path: "{{ _qdrouterd_etc_conf_path }}"
qdrouterd_etc_conf_file: "{{ _qdrouterd_etc_conf_file }}"
qdrouterd_log_file: "/var/log/qdrouterd/qdrouterd.log"
qdrouterd_log_file: "/var/log/qdrouterd/qdrouterd.log"
# Qdrouterd router config
qdrouterd_host_count: "{{ groups['qdrouterd_all'] | length}}"
qdrouterd_host_count: "{{ groups['qdrouterd_all'] | length }}"
qdrouterd_mode: "{% if qdrouterd_host_count == '1' %}standalone{% else %}interior{% endif %}"
qdrouterd_listener_addr: 0.0.0.0
qdrouterd_listener_port_ssl: 31459
@ -48,7 +48,7 @@ qdrouterd_log_enable: "trace+"
# Qdrouterd SSL support
qdrouterd_ssl_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd.pem"
qdrouterd_ssl_key: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd.key"
#qdrouterd_ssl_ca_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd-ca.pem"
# qdrouterd_ssl_ca_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd-ca.pem"
# Set qdrouterd_ssl_sefl_signed_regen to true if you want to generate a new
# SSL certificate for Qdrouterd when this playbook runs. You can also change
@ -58,6 +58,6 @@ qdrouterd_ssl_self_signed_subject: "/C=US/ST=Massachusetts/L=Boston/O=IT/CN={{ a
# Define user-provided SSL certificates in:
# /etc/openstack_deploy/user_variables.yml
#qdrouterd_user_ssl_cert: <path to cert on ansible deployment host>
#qdrouterd_user_ssl_key: <path to cert on ansible deployment host>
#qdrouterd_user_ssl_ca_cert: <path to cert on ansible deployment host>
# qdrouterd_user_ssl_cert: <path to cert on ansible deployment host>
# qdrouterd_user_ssl_key: <path to cert on ansible deployment host>
# qdrouterd_user_ssl_ca_cert: <path to cert on ansible deployment host>

View File

@ -16,15 +16,23 @@ galaxy_info:
author: Andy Smith
description: This role installs and configures the qpid-dispatch-router
license: Apache
min_ansible_version: 2.3
min_ansible_version: "2.10"
namespace: openstack
role_name: qdrouterd
platforms:
- name: Ubuntu
versions:
- focal
categories:
- messaging
- cloud
- openstack
- name: Debian
versions:
- bullseye
- name: Ubuntu
versions:
- focal
- jammy
- name: EL
versions:
- "9"
galaxy_tags:
- messaging
- cloud
- openstack
dependencies: []

View File

@ -24,9 +24,11 @@
tags:
- always
- import_tasks: qdrouterd_pre_install.yml
- name: Importing qdrouterd_pre_install tasks
import_tasks: qdrouterd_pre_install.yml
- import_tasks: qdrouterd_install.yml
- name: Importing qdrouterd_install tasks
import_tasks: qdrouterd_install.yml
# Qdrouterd SSL/TLS listener configuration
#
@ -38,17 +40,20 @@
#
# playbooks/roles/qdrouterd/defaults/main.yml
#
- include_tasks: qdrouterd_ssl_self_signed.yml
- name: Including qdrouterd_ssl_self_signed tasks
include_tasks: qdrouterd_ssl_self_signed.yml
when: >
qdrouterd_user_ssl_cert is not defined or
qdrouterd_user_ssl_key is not defined
tags:
- qdrouterd-config
- import_tasks: qdrouterd_ssl_user_provided.yml
- name: Importing qdrouterd_ssl_user_provided tasks
import_tasks: qdrouterd_ssl_user_provided.yml
tags:
- qdrouterd-config
- import_tasks: qdrouterd_post_install.yml
- name: Importing qdrouterd_post_install tasks
import_tasks: qdrouterd_post_install.yml
tags:
- qdrouterd-config

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include_tasks: "qdrouterd_install_{{ ansible_pkg_mgr }}.yml"
- name: Including qdrouterd_install tasks
include_tasks: "qdrouterd_install_{{ ansible_pkg_mgr }}.yml"
tags:
- qdrouterd_server-install
@ -25,6 +26,7 @@
tags:
- qdrouterd_server-install
- import_tasks: qdrouterd_started.yml
- name: Importing qdrouterd_started tasks
import_tasks: qdrouterd_started.yml
tags:
- qdrouterd_server-config

View File

@ -15,30 +15,30 @@
#
# TODO (ansmith): conditionally enable epel
#
#- name: Check if EPEL repo is already configured.
# stat: path={{ epel_repofile_path }}
# register: epel_repofile_result
# - name: Check if EPEL repo is already configured.
# stat: path={{ epel_repofile_path }}
# register: epel_repofile_result
#
#- name: Install EPEL repo.
# yum:
# name: "{{ epel_repo_url }}"
# state: present
# register: result
# when: not epel_repofile_result.stat.exists
# - name: Install EPEL repo.
# yum:
# name: "{{ epel_repo_url }}"
# state: present
# register: result
# when: not epel_repofile_result.stat.exists
#
#- name: Import EPEL GPG key
# rpm_key:
# key: "{{ epel_repo_gpg_key_url }}"
# state: present
# when: not epel_repofile_result.stat.exists
# - name: Import EPEL GPG key
# rpm_key:
# key: "{{ epel_repo_gpg_key_url }}"
# state: present
# when: not epel_repofile_result.stat.exists
#
#- name: Ensure yum-config-manager is installed
# package:
# name: yum-utils
# state: present
# - name: Ensure yum-config-manager is installed
# package:
# name: yum-utils
# state: present
#
#- name: Ensure that EPEL is enabled
# shell: yum-config-manager --enable epel
# - name: Ensure that EPEL is enabled
# shell: yum-config-manager --enable epel
- name: Install Qpid Dispatch Router (qdrouterd) packages
yum:

View File

@ -44,5 +44,6 @@
tags:
- qdrouterd-config
- include_tasks: qdrouterd_restart.yml
- name: Including qdrouterd_restart tasks
include_tasks: qdrouterd_restart.yml
when: qdrouterd_config_changed is changed

View File

@ -32,5 +32,3 @@
mode: "0755"
tags:
- qdrouterd-config

View File

@ -13,5 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- import_tasks: qdrouterd_stopped.yml
- import_tasks: qdrouterd_started.yml
- name: Importing qdrouterd_stopped tasks
import_tasks: qdrouterd_stopped.yml
- name: Importing qdrouterd_started tasks
import_tasks: qdrouterd_started.yml

View File

@ -31,7 +31,7 @@
- name: Register a fact for the cert and key
set_fact:
qdrouterd_ssl_cert_fact: "{{ _qdrouterd_ssl_cert.content }}"
qdrouterd_ssl_key_fact: "{{ _qdrouterd_ssl_key.content }}"
qdrouterd_ssl_cert_fact: "{{ _qdrouterd_ssl_cert.content }}"
qdrouterd_ssl_key_fact: "{{ _qdrouterd_ssl_key.content }}"
tags:
- qdrouterd-ssl

View File

@ -15,11 +15,14 @@
# We create the self-signed SSL certificate and key only on the first
# Qdrouterd container.
- include_tasks: qdrouterd_ssl_key_create.yml
- name: Including qdrouterd_ssl_key_create tasks
include_tasks: qdrouterd_ssl_key_create.yml
when: inventory_hostname == groups[qdrouterd_host_group][0]
- include_tasks: qdrouterd_ssl_key_store.yml
- name: Including qdrouterd_ssl_key_store tasks
include_tasks: qdrouterd_ssl_key_store.yml
when: inventory_hostname == groups[qdrouterd_host_group][0]
- include_tasks: qdrouterd_ssl_key_distribute.yml
- name: Including qdrouterd_ssl_key_distribute tasks
include_tasks: qdrouterd_ssl_key_distribute.yml
when: inventory_hostname != groups[qdrouterd_host_group][0]