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: I43eaa6d471cf5f8b72febdeda1bf8a6df438eb11
This commit is contained in:
Dmitriy Rabotyagov 2023-07-12 12:11:47 +02:00
parent 3fa317e79a
commit 83ae6cce1d
3 changed files with 18 additions and 11 deletions

View File

@ -2,19 +2,21 @@ galaxy_info:
author: vexxhost
description: Installation and configuration of uwsgi
company: Vexxhost
role_name: uwsgi
namespace: openstack
license: Apache2
min_ansible_version: 2.8
min_ansible_version: "2.10"
platforms:
- name: Debian
versions:
- buster
- bullseye
- name: Ubuntu
versions:
- bionic
- focal
- jammy
- name: EL
versions:
- 8
- "9"
galaxy_tags:
- cloud
- uwsgi

View File

@ -35,7 +35,8 @@
tags:
- always
- include_tasks: uwsgi_install.yml
- name: Including uwsgi_install tasks
include_tasks: uwsgi_install.yml
args:
apply:
tags:
@ -44,7 +45,8 @@
tags:
- uwsgi-install
- include_tasks: uwsgi_post_install.yml
- name: Including uwsgi_post_install tasks
include_tasks: uwsgi_post_install.yml
args:
apply:
tags:

View File

@ -17,6 +17,7 @@
file:
path: "/etc/uwsgi/"
state: directory
mode: "0755"
- name: Deploy uWSGI configuration files
openstack.config_template.config_template:
@ -38,15 +39,17 @@
systemd_slice_name: "{{ uwsgi_system_slice_name }}"
systemd_lock_dir: "{{ uwsgi_lock_dir }}/{{ service_var.key }}"
systemd_run_dir: "{{ uwsgi_run_dir }}/{{ service_var.key }}"
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:
- service_name: "{{ service_var.value.service_name | default(service_var.key) }}"
enabled: "{{ service_var.value.enabled | default(True) }}"
state: "{{ service_var.value.state | default('started') }}"
execstarts: "{{ uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/{{ service_var.key }}.ini {{ (service_var.value.uwsgi_pyargv is defined) | ternary('--pyargv \"' ~ service_var.value.uwsgi_pyargv | default('') ~ '\"', '') }}"
execstarts: >-
{{ uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/{{ service_var.key }}.ini
{{ (service_var.value.uwsgi_pyargv is defined) | ternary('--pyargv \"' ~ service_var.value.uwsgi_pyargv | default('') ~ '\"', '') }}
execreloads: "{{ uwsgi_bin }}/uwsgi --reload {{ uwsgi_run_dir }}/{{ service_var.key }}/{{ uwsgi_system_slice_name }}/{{ service_var.key }}.pid"
config_overrides: "{{ service_var.value.init_config_overrides | default({}) | combine(uwsgi_init_config_overrides, recursive=True) }}"
with_dict: "{{ uwsgi_services }}"