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.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I9aaf6680c274453a16b6f9879cf488ae2050e71f
This commit is contained in:
Dmitriy Rabotyagov 2023-07-14 20:07:26 +02:00
parent 168e116a36
commit 4382257d3f
7 changed files with 51 additions and 34 deletions

View File

@ -19,7 +19,7 @@
## Verbosity Options
debug: False
#python venv executable
# python venv executable
tacker_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"
# Enable/Disable Ceilometer
@ -29,7 +29,11 @@ tacker_ceilometer_enabled: "{{ (groups['ceilometer_all'] is defined) and (groups
# for the service setup. The host must already have
# clouds.yaml properly configured.
tacker_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
tacker_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((tacker_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
tacker_service_setup_host_python_interpreter: >-
{{
openstack_service_setup_host_python_interpreter | default(
(tacker_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
}}
# Set the package install state for distribution packages
# Options are 'present' and 'latest'
@ -37,7 +41,8 @@ tacker_package_state: "{{ package_state | default('latest') }}"
tacker_git_repo: https://opendev.org/openstack/tacker
tacker_git_install_branch: master
tacker_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}"
tacker_upper_constraints_url: >-
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
tacker_git_constraints:
- "--constraint {{ tacker_upper_constraints_url }}"
@ -96,7 +101,11 @@ tacker_optional_oslomsg_amqp1_pip_packages:
## Database info
tacker_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
tacker_db_setup_python_interpreter: "{{ openstack_db_setup_python_interpreter | default((tacker_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable'])) }}"
tacker_db_setup_python_interpreter: >-
{{
openstack_db_setup_python_interpreter | default(
(tacker_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
}}
tacker_galera_address: "{{ galera_address | default('127.0.0.1') }}"
tacker_galera_database: tacker
tacker_galera_user: tacker
@ -136,20 +145,20 @@ tacker_services:
service_name: "{{ tacker_service_name }}"
enabled: yes
state: started
execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options|default('') }}"
execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options | default('') }}"
config_overrides: "{{ tacker_init_config_overrides }}"
tacker-conductor:
group: tacker_server
service_name: "{{ tacker_conductor_program_name }}"
enabled: yes
state: started
execstarts: "{{ tacker_bin }}/{{ tacker_conductor_program_name }} {{ tacker_conductor_config_options|default('') }}"
execstarts: "{{ tacker_bin }}/{{ tacker_conductor_program_name }} {{ tacker_conductor_config_options | default('') }}"
config_overrides: "{{ tacker_conductor_init_config_overrides }}"
## Barbican service
barbican_keys_backend: false
#NOTE: move password to tests/test-vars.yml
# NOTE: move password to tests/test-vars.yml
tacker_service_password: password
## Keystone
@ -240,5 +249,5 @@ tacker_pki_install_certificates:
mode: "0600"
# Define user-provided SSL certificates
#tacker_user_ssl_cert: <path to cert on ansible deployment host>
#tacker_user_ssl_key: <path to cert on ansible deployment host>
# tacker_user_ssl_cert: <path to cert on ansible deployment host>
# tacker_user_ssl_key: <path to cert on ansible deployment host>

View File

@ -21,20 +21,21 @@ galaxy_info:
description: Tacker deployment with OpenStack Ansible
company: OpenStack
license: Apache2
min_ansible_version: 1.9
role_name: os_tacker
namespace: openstack
min_ansible_version: "2.10"
platforms:
- name: Debian
versions:
- buster
- name: Ubuntu
versions:
- bionic
- focal
- name: EL
versions:
- 8
- name: Debian
versions:
- bullseye
- name: Ubuntu
versions:
- focal
- jammy
- name: EL
versions:
- "9"
galaxy_tags:
- cloud
- openstack

View File

@ -30,7 +30,8 @@
tags:
- always
- include_role:
- name: Including osa.db_setup role
include_role:
name: openstack.osa.db_setup
apply:
tags:
@ -51,7 +52,8 @@
tags:
- always
- include_role:
- name: Including osa.mq_setup role
include_role:
name: openstack.osa.mq_setup
apply:
tags:
@ -73,7 +75,8 @@
tags:
- always
- import_tasks: tacker_pre_install.yml
- name: Importing tacker_pre_install tasks
import_tasks: tacker_pre_install.yml
tags:
- tacker-install
@ -114,7 +117,8 @@
tags:
- tacker-install
- import_tasks: tacker_post_install.yml
- name: Importing tacker_post_install tasks
import_tasks: tacker_post_install.yml
tags:
- tacker-install
- tacker-config
@ -128,23 +132,25 @@
systemd_tempd_prefix: openstack
systemd_slice_name: tacker
systemd_lock_path: /var/lock/tacker
systemd_CPUAccounting: true
systemd_BlockIOAccounting: true
systemd_MemoryAccounting: true
systemd_TasksAccounting: true
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
- import_tasks: tacker_db_sync.yml
- name: Importing tacker_db_sync tasks
import_tasks: tacker_db_sync.yml
when:
- _tacker_is_first_play_host
tags:
- tacker-install
- include_role:
- name: Including osa.service_setup role
include_role:
name: openstack.osa.service_setup
apply:
tags:

View File

@ -25,4 +25,3 @@
tags:
- tacker-rabbitmq
- tacker-rabbitmq-user

View File

@ -68,6 +68,7 @@
dest: "{{ tacker_etc_dir }}/rootwrap.d/"
owner: "root"
group: "root"
mode: "0644"
with_fileglob:
- rootwrap.d/*
notify:

View File

@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: create the system group
- name: Create the system group
group:
name: "{{ tacker_system_group_name }}"
state: "present"

View File

@ -15,4 +15,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
_tacker_is_first_play_host: "{{ ('tacker_all' in group_names and inventory_hostname == (groups['tacker_all'] | intersect(ansible_play_hosts)) | first) | bool }}"
_tacker_is_first_play_host: >-
{{ ('tacker_all' in group_names and inventory_hostname == (groups['tacker_all'] | intersect(ansible_play_hosts)) | first) | bool }}