lint fixes

This commit is contained in:
Alexander Kazantsev 2026-05-15 21:13:55 +03:00
parent 8b1b0b8dc5
commit 04a8acf0aa
6 changed files with 12 additions and 20 deletions

View file

@ -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

View file

@ -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 }}"

View file

@ -1,2 +1,2 @@
---
install_root_cert_pem: root_ca.crt
install_root_cert_pem: root_ca.crt

View file

@ -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

View file

@ -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

View file

@ -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