From 04a8acf0aaa9bd9cb1c80a92eab846cc32692a9f Mon Sep 17 00:00:00 2001 From: Alexander Kazantsev Date: Fri, 15 May 2026 21:13:55 +0300 Subject: [PATCH] lint fixes --- playbooks/rocky9.yml | 9 ++++----- roles/rocky9/defaults/main.yml | 7 ------- roles/root-cert/defaults/main.yml | 2 +- roles/root-cert/tasks/darwin.yml | 6 +++--- roles/root-cert/tasks/debian.yml | 6 +++--- roles/root-cert/tasks/main.yml | 2 +- 6 files changed, 12 insertions(+), 20 deletions(-) diff --git a/playbooks/rocky9.yml b/playbooks/rocky9.yml index 48e22ff..2c85bcc 100644 --- a/playbooks/rocky9.yml +++ b/playbooks/rocky9.yml @@ -1,7 +1,7 @@ --- - name: Initial Rocky9 Configuration - hosts: + hosts: - rocky9-template # kuber-node01 # - 172.20.21.193 @@ -18,8 +18,8 @@ - openssh vars: - #ansible_ssh_user: root - #ansible_ssh_password: nmklop90 + # ansible_ssh_user: root + # ansible_ssh_password: nmklop90 epel_repo: true reboot_system: false hostname: "{{ ansible_hostname }}.local.mrwho.ru" @@ -31,7 +31,7 @@ openssh_enable_persourcepenalties: true openssh_persource_authfail_penalty: "10s" # Aggressive penalty openssh_persource_maxstartups: "5:30:10" # Very restrictive - # Disable all port forwarding + # Disable all port forwarding openssh_disable_forwarding_comprehensive: false openssh_x11_forwarding: false # Restrict to strongest cryptography only @@ -69,4 +69,3 @@ - root - admin - test - diff --git a/roles/rocky9/defaults/main.yml b/roles/rocky9/defaults/main.yml index 8263697..67d9f55 100644 --- a/roles/rocky9/defaults/main.yml +++ b/roles/rocky9/defaults/main.yml @@ -1,11 +1,4 @@ --- -#hostname: centos01.local.mrwho.ru -#ip4_addr: 172.20.21.101/24 -#ip4_gate: 172.20.21.1 -#ip4_dns: -# - 172.20.21.1 -# - 192.168.1.1 -#reboot_system: false epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts.distribution_major_version }}.noarch.rpm" epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts.distribution_major_version }}" diff --git a/roles/root-cert/defaults/main.yml b/roles/root-cert/defaults/main.yml index d9bbe20..b1d336d 100644 --- a/roles/root-cert/defaults/main.yml +++ b/roles/root-cert/defaults/main.yml @@ -1,2 +1,2 @@ --- -install_root_cert_pem: root_ca.crt \ No newline at end of file +install_root_cert_pem: root_ca.crt diff --git a/roles/root-cert/tasks/darwin.yml b/roles/root-cert/tasks/darwin.yml index 8840c0f..cc4f94d 100644 --- a/roles/root-cert/tasks/darwin.yml +++ b/roles/root-cert/tasks/darwin.yml @@ -4,12 +4,12 @@ - block: - name: Copy certificate to temporary location - copy: + ansible.builtin.copy: src: "{{ install_root_cert_pem }}" dest: "{{ install_root_cert_tmp_path }}" - name: Add certificate to Mac OS keychain - command: security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "{{ install_root_cert_tmp_path }}" + ansible.builtin.command: security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "{{ install_root_cert_tmp_path }}" # - name: Add certificate to Mac OS (openssl) # copy: @@ -21,6 +21,6 @@ always: - name: Remove temporary certificate - file: + ansible.builtin.file: path: "{{ install_root_cert_tmp_path }}" state: absent diff --git a/roles/root-cert/tasks/debian.yml b/roles/root-cert/tasks/debian.yml index c97ceef..191a050 100644 --- a/roles/root-cert/tasks/debian.yml +++ b/roles/root-cert/tasks/debian.yml @@ -1,16 +1,16 @@ --- - name: Make sure the folder exists (Debian, Ubuntu) - file: + ansible.builtin.file: path: /usr/local/share/ca-certificates state: directory # Note that the .crt is actually a .pem renamed - name: Copy the certificate (Debian, Ubuntu) - copy: + ansible.builtin.copy: src: "{{ install_root_cert_pem }}" dest: "/usr/local/share/ca-certificates/{{ install_root_cert_pem | basename }}.crt" register: result - name: Update CA Trust (Debian, Ubuntu) - command: update-ca-certificates + ansible.builtin.command: update-ca-certificates when: result is changed diff --git a/roles/root-cert/tasks/main.yml b/roles/root-cert/tasks/main.yml index edec5bf..1e284f3 100644 --- a/roles/root-cert/tasks/main.yml +++ b/roles/root-cert/tasks/main.yml @@ -1,5 +1,5 @@ --- -#- name: Check that the root certificate exists +# - name: Check that the root certificate exists # become: no # local_action: "stat path={{ install_root_cert_pem }}" # register: result