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: I9ddc816b49957aba9389c9712afd7d1bb02bd927
This commit is contained in:
Dmitriy Rabotyagov 2025-02-13 09:11:53 +01:00
parent 52490d39d1
commit c2048a7148
7 changed files with 23 additions and 22 deletions

1
.gitignore vendored
View File

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

View File

@ -1,8 +1,8 @@
---
collections:
- name: https://opendev.org/openstack/ansible-config_template
- name: https://opendev.org/openstack/ansible-config_template
version: master
type: git
- name: https://github.com/ansible-collections/ansible.utils
- name: https://github.com/ansible-collections/ansible.utils
version: main
type: git

View File

@ -39,7 +39,7 @@
copy:
src: "{{ item.keyfile }}"
dest: "{{ item.key }}"
mode: '0644'
mode: "0644"
with_items: "{{ systemd_networkd_package_repos_keys | selectattr('keyfile', 'defined') | list }}"
when:
- ansible_facts['os_family'] | lower == 'redhat'
@ -72,12 +72,12 @@
yum_repository:
name: epel-networkd
baseurl: "{{ systemd_networkd_epel_mirror ~ '/' ~ ansible_facts['distribution_major_version'] ~ '/Everything/' ~ ansible_facts['architecture'] }}"
description: 'Extra Packages for Enterprise Linux $releasever - $basearch'
description: "Extra Packages for Enterprise Linux $releasever - $basearch"
gpgkey: "file://{{ systemd_networkd_package_repos_keys[0].key }}"
gpgcheck: yes
enabled: yes
gpgcheck: true
enabled: true
state: present
includepkgs: 'systemd-networkd'
includepkgs: "systemd-networkd"
when:
- ansible_facts['os_family'] | lower == 'redhat'
register: install_epel_repo
@ -255,9 +255,9 @@
sysctl:
name: "net.ipv4.conf.{{ item.1.interface }}.forwarding"
value: 1
sysctl_set: yes
sysctl_set: true
state: present
reload: yes
reload: true
with_indexed_items: "{{ _systemd_networks_named }}"
when:
- (ansible_facts['os_family'] | lower) == 'redhat'