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: Ia76cbf1f2913dc4e03e19200f53d51f027769306
This commit is contained in:
Dmitriy Rabotyagov 2025-02-13 09:04:48 +01:00
parent ebfe801b9c
commit be093f9f58
8 changed files with 18 additions and 14 deletions

1
.gitignore vendored
View File

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

View File

@ -21,7 +21,7 @@ systemd_centos_epel_key: >-
# Any optioned required to make the mount point work. If no options are
# provided the default will be used. This list is comma separted.
# https://www.freedesktop.org/software/systemd/man/systemd.mount.html#Options=
systemd_default_mount_options: 'defaults'
systemd_default_mount_options: "defaults"
# The systemd mounts dictionary is a set of mounts that will be created. The
# dictionary can contain the following options:

View File

@ -1,3 +1,4 @@
---
- name: Create a systemd mount file for Mount1 and 2
hosts: localhost
become: true
@ -6,14 +7,14 @@
vars:
systemd_mounts:
machines:
what: '/var/lib/machines.raw'
where: '/var/lib/machines'
type: 'btrfs'
options: 'loop'
what: "/var/lib/machines.raw"
where: "/var/lib/machines"
type: "btrfs"
options: "loop"
unit:
ConditionPathExists:
- '/var/lib/machines.raw'
state: 'started'
- "/var/lib/machines.raw"
state: "started"
enabled: true
glance_images:
config_overrides: {}

View File

@ -33,6 +33,6 @@
- name: Reload systemd daemon
systemd:
daemon_reload: yes
no_block: yes
daemon_reload: true
no_block: true
listen: Remove mount

View File

@ -38,8 +38,8 @@
name: epel-systemd_mounts
baseurl: "{{ systemd_centos_epel_mirror ~ '/' ~ ansible_facts['distribution_major_version'] ~ '/Everything/' ~ ansible_facts['architecture'] }}"
description: "Extra Packages for Enterprise Linux {{ ansible_facts['distribution_major_version'] }} - $basearch"
gpgcheck: yes
enabled: yes
gpgcheck: true
enabled: true
state: present
includepkgs: "s3fs-fuse"
register: install_epel_repo

View File

@ -66,7 +66,7 @@
- name: Load or Unload mount(s)
systemd:
daemon_reload: yes
daemon_reload: true
name: "{{ mount_service_name.stdout }}"
enabled: "{{ item.enabled | default(true) }}"
when:
@ -103,10 +103,10 @@
- name: Unload mount(s)
systemd:
daemon_reload: yes
daemon_reload: true
name: "{{ mount_service_name.stdout }}"
enabled: false
no_block: yes
no_block: true
when:
- item.state | default('unknown') == 'absent'
notify: Remove mount

View File

@ -1,3 +1,4 @@
---
systemd_nfs_packages:
- nfs-common

View File

@ -1,3 +1,4 @@
---
systemd_nfs_packages:
- nfs-utils