Auto-fix yaml rules

In order to reduce divergance with ansible-lint rules, we apply
auto-fixing of violations.

In current patch we replace all kind of truthy variables with
`true` or `false` values to align with recommendations along with
alignment of used quotes.

Change-Id: Ib65002dbe635a4560259664c2079449dd6895fa7
This commit is contained in:
Dmitriy Rabotyagov
2025-02-12 14:28:31 +01:00
parent 81eda765cb
commit 2d3c7f2db0
11 changed files with 18 additions and 21 deletions

1
.gitignore vendored
View File

@@ -45,6 +45,7 @@ logs/*
# OS generated files #
######################
._*
.ansible
.tox
*.egg-info
.eggs

View File

@@ -1,3 +1,4 @@
---
# Copyright 2022, BBC R&D
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -54,7 +55,7 @@ skyline_console_git_install_branch: master
# We will not build yarn when version matches a regex for valid Python versions, then
# it's assumed, that version in topic should be available from PyPi and build is not needed.
skyline_console_pypi_version_regex: '^(\d*!)?(\d*)(\.(\d*))*((a|b|rc)(\d*))?(\.post(\d*))?(\.dev(\d*))?$'
skyline_console_pypi_version_regex: "^(\\d*!)?(\\d*)(\\.(\\d*))*((a|b|rc)(\\d*))?(\\.post(\\d*))?(\\.dev(\\d*))?$"
skyline_upper_constraints_url: >-
{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
@@ -98,7 +99,7 @@ skyline_ssl_cipher_suite_tls12: >-
# TLS v1.3
skyline_ssl_cipher_suite_tls13: >-
{{ ssl_cipher_suite_tls13 | default('TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256') }}
skyline_pki_regen_cert: ''
skyline_pki_regen_cert: ""
skyline_pki_san: "{{ openstack_pki_san | default('DNS:' ~ ansible_facts['hostname'] ~ ',IP:' ~ management_address) }}"
# skyline_user_ssl_cert: <path to cert on ansible deployment host>
# skyline_user_ssl_key: <path to cert on ansible deployment host>
@@ -128,7 +129,7 @@ skyline_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}
skyline_service_port: 9999
skyline_server_name: "{{ ansible_facts['fqdn'] | default('skyline') }}"
# skyline_prometheus_basic_auth_password:
skyline_prometheus_basic_auth_user: 'skyline'
skyline_prometheus_basic_auth_user: "skyline"
# skyline_secret_key:
skyline_interface: internal
## Cap the maximum number of threads / workers when a user value is unspecified.

View File

@@ -1,3 +1,4 @@
---
skyline_hosts:
aio1:
ip: 172.29.236.100

View File

@@ -1,3 +1,4 @@
---
skyline_prometheus_basic_auth_password: secrete
skyline_service_password: secrete
skyline_galera_password: secrete

View File

@@ -12,14 +12,12 @@
# 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: Stop services
service:
name: "{{ item.service_name }}"
enabled: yes
enabled: true
state: "stopped"
daemon_reload: yes
daemon_reload: true
loop: "{{ filtered_skyline_services }}"
register: _stop
until: _stop is success
@@ -32,9 +30,9 @@
- name: Start services
service:
name: "{{ item.service_name }}"
enabled: yes
enabled: true
state: "started"
daemon_reload: yes
daemon_reload: true
loop: "{{ filtered_skyline_services }}"
register: _start
until: _start is success

View File

@@ -37,7 +37,7 @@
options:
- '<FilesMatch "\.(html|css|js|jpg|jpeg|png|gif|ico|svg|eot|otf|woff|woff2|ttf)$">'
- ' Header set Cache-Control "max-age=86400, public"'
- '</FilesMatch>'
- </FilesMatch>
- RewriteEngine On
- RewriteCond %{REQUEST_URI} !^/index.html$
- RewriteCond %{REQUEST_FILENAME} !-f

View File

@@ -46,7 +46,7 @@
venv_facts_when_changed:
- section: "skyline"
option: "need_service_restart"
value: True
value: true
- section: "skyline"
option: "venv_tag"
value: "{{ skyline_venv_tag }}"
@@ -66,7 +66,7 @@
systemd_service_tasks_accounting: true
systemd_services:
- service_name: "{{ service_var.service_name }}"
enabled: yes
enabled: true
state: started
execstarts: "{{ service_var.execstarts }}"
execreloads: "{{ service_var.execreloads | default([]) }}"

View File

@@ -38,8 +38,8 @@
name: epel-yarn
baseurl: "{{ skyline_yarn_epel_mirror ~ '/' ~ ansible_facts['distribution_major_version'] ~ '/Everything/' ~ ansible_facts['architecture'] }}"
description: "NodeJS Packages for Enterprise Linux {{ ansible_facts['distribution_major_version'] }} - $basearch"
gpgcheck: yes
enabled: yes
gpgcheck: true
enabled: true
state: present
includepkgs: "yarnpkg"
register: install_epel_repo
@@ -54,7 +54,7 @@
version: "{{ skyline_console_git_install_branch }}"
dest: "{{ skyline_console_yarn_build_path }}"
force: true
changed_when: False
changed_when: false
- name: Detect if rebuild is needed
delegate_to: "{{ skyline_console_yarn_setup_host }}"

View File

@@ -12,8 +12,6 @@
# 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.
## APT Cache options
cache_timeout: 600

View File

@@ -12,8 +12,6 @@
# 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.
## APT Cache options
cache_timeout: 600

View File

@@ -1,5 +1,4 @@
---
- job:
name: openstack-ansible-deploy-aio_skyline_yarn-ubuntu-jammy
parent: openstack-ansible-deploy-aio
@@ -8,4 +7,4 @@
- job:
name: openstack-ansible-deploy-aio_skyline_yarn-rockylinux-9
parent: openstack-ansible-deploy-aio
nodeset: rockylinux-9
nodeset: rockylinux-9