From a9b6d6286bd3aeebe0763f0166a35e366b17b68b Mon Sep 17 00:00:00 2001 From: Marcin Bojko Date: Mon, 25 Nov 2024 16:28:33 +0100 Subject: [PATCH] fix: Update quotes in YAML files for consistency Fixed inconsistent usage of single and double quotes in YAML files for better readability and maintainability. --- .github/workflows/01_lint_me.yml | 2 +- extra/playbooks/provision_alma8_variables.yml | 1 - .../playbooks/provision_oracle9_variables.yml | 1 - extra/playbooks/provision_rhel.yaml | 38 +++++++++---------- .../playbooks/provision_rocky8_variables.yml | 2 +- extra/playbooks/provision_vagrant.yaml | 8 ++-- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.github/workflows/01_lint_me.yml b/.github/workflows/01_lint_me.yml index c7c5011..3c14e08 100644 --- a/.github/workflows/01_lint_me.yml +++ b/.github/workflows/01_lint_me.yml @@ -45,7 +45,7 @@ jobs: DEFAULT_BRANCH: ${{ github.ref_name }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VALIDATE_ALL_CODEBASE: ${{ github.event_name != 'pull_request' }} - FILTER_REGEX_EXCLUDE: '.*extra/.*' + FILTER_REGEX_EXCLUDE: ".*extra/.*" VALIDATE_JSCPD: false VALIDATE_TERRAGRUNT: false VALIDATE_GITLEAKS: false diff --git a/extra/playbooks/provision_alma8_variables.yml b/extra/playbooks/provision_alma8_variables.yml index 8810efc..0d10bb2 100644 --- a/extra/playbooks/provision_alma8_variables.yml +++ b/extra/playbooks/provision_alma8_variables.yml @@ -141,4 +141,3 @@ gpgkey: state: present - url: https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-8 state: present - diff --git a/extra/playbooks/provision_oracle9_variables.yml b/extra/playbooks/provision_oracle9_variables.yml index 8908f64..71b2db5 100644 --- a/extra/playbooks/provision_oracle9_variables.yml +++ b/extra/playbooks/provision_oracle9_variables.yml @@ -131,4 +131,3 @@ kernel_parameters: - key: "fsck.repair" value: "yes" state: present - diff --git a/extra/playbooks/provision_rhel.yaml b/extra/playbooks/provision_rhel.yaml index adca8e9..34e71a0 100644 --- a/extra/playbooks/provision_rhel.yaml +++ b/extra/playbooks/provision_rhel.yaml @@ -39,8 +39,9 @@ tags: - assert - name: assert_root_partition_has_16_GB_of_free_space - ansible.builtin.assert: {that: item.mount == '/' or item.size_available > 17179869184} - loop: '{{ ansible_mounts }}' + ansible.builtin.assert: + { that: item.mount == '/' or item.size_available > 17179869184 } + loop: "{{ ansible_mounts }}" ignore_errors: false when: item.mount == '/' register: freespace @@ -141,7 +142,7 @@ changed_when: true - name: install_extra_groups ansible.builtin.package: - name: '{{ item }}' + name: "{{ item }}" state: present loop: "{{ yum_extra_groups }}" retries: "{{ retries_count }}" @@ -152,7 +153,7 @@ # let's install extra packages - name: install_extra_packages ansible.builtin.package: - name: '{{ item }}' + name: "{{ item }}" state: present loop: "{{ yum_extra_packages }}" retries: "{{ retries_count }}" @@ -162,7 +163,7 @@ # let's install extra_epel_packages - name: install_extra_epel_packages ansible.builtin.package: - name: '{{ item }}' + name: "{{ item }}" state: present loop: "{{ yum_extra_epel_packages }}" retries: "{{ retries_count }}" @@ -213,7 +214,6 @@ delay: "{{ delay_time }}" until: r_start_webmin is success - - name: start_cockpit_block when: install_cockpit is defined and install_cockpit block: @@ -239,7 +239,7 @@ ansible.builtin.get_url: url: "{{ item.url }}" dest: "{{ item.dest }}" - mode: '0644' + mode: "0644" register: r_neofetch_repository retries: "{{ retries_count }}" delay: "{{ delay_time }}" @@ -260,7 +260,7 @@ ansible.builtin.command: neofetch when: r_neofetch_repository is success changed_when: false -# ignore_errors: true + # ignore_errors: true any_errors_fatal: false failed_when: false - name: create_config_folder @@ -594,8 +594,8 @@ - name: change_sshd_dns_settings ansible.builtin.lineinfile: path: /etc/ssh/sshd_config - regexp: 'UseDNS' - line: 'UseDNS no' + regexp: "UseDNS" + line: "UseDNS no" backrefs: true state: present # required sysctl entries @@ -685,15 +685,15 @@ # let's clean logs and leftovers - name: cleaning_stuff ansible.builtin.shell: | - truncate -s 0 /var/log/* - truncate -s 0 -c /var/log/**/* - find /var/log -type f -name \"*.[0-99].gz\" -exec rm {} + - rm -rfv /etc/ansible/* - rm -rfv /var/log/anaconda/* - rm -rfv /var/cache/libvirt/* - rm -rfv /var/cache/powertop/* - rm -rfv /var/crash/* - rm -rfv /var/tmp/* + truncate -s 0 /var/log/* + truncate -s 0 -c /var/log/**/* + find /var/log -type f -name \"*.[0-99].gz\" -exec rm {} + + rm -rfv /etc/ansible/* + rm -rfv /var/log/anaconda/* + rm -rfv /var/cache/libvirt/* + rm -rfv /var/cache/powertop/* + rm -rfv /var/crash/* + rm -rfv /var/tmp/* any_errors_fatal: false failed_when: false changed_when: false diff --git a/extra/playbooks/provision_rocky8_variables.yml b/extra/playbooks/provision_rocky8_variables.yml index 993c308..b04574e 100644 --- a/extra/playbooks/provision_rocky8_variables.yml +++ b/extra/playbooks/provision_rocky8_variables.yml @@ -135,4 +135,4 @@ kernel_parameters: state: present - key: "systemd.unified_cgroup_hierarchy" value: "1" - state: present \ No newline at end of file + state: present diff --git a/extra/playbooks/provision_vagrant.yaml b/extra/playbooks/provision_vagrant.yaml index bd62d4e..7ccbaa4 100644 --- a/extra/playbooks/provision_vagrant.yaml +++ b/extra/playbooks/provision_vagrant.yaml @@ -79,8 +79,8 @@ dest: /etc/sudoers.d/vagrant mode: 0440 content: | - {{ vagrant_username }} ALL=(ALL) NOPASSWD: ALL - Defaults:{{ vagrant_username }} !requiretty + {{ vagrant_username }} ALL=(ALL) NOPASSWD: ALL + Defaults:{{ vagrant_username }} !requiretty validate: /usr/sbin/visudo -csf %s register: r_vagrant_sudoers_file until: r_vagrant_sudoers_file is success @@ -89,9 +89,9 @@ ansible.builtin.lineinfile: dest: /etc/sudoers regexp: '^(Defaults\s+requiretty)$' - line: '#Defaults requiretty' + line: "#Defaults requiretty" insertafter: EOF state: present register: r_disable_requiretty until: r_disable_requiretty is success - when: (r_create_vagrant_user is defined and r_create_vagrant_user is success) and (r_vagrant_sudoers_file is success and r_vagrant_sudoers_file is defined) + when: (r_create_vagrant_user is defined and r_create_vagrant_user is success) and (r_vagrant_sudoers_file is success and r_vagrant_sudoers_file is defined)