This commit is contained in:
Alexander Kazantsev 2026-05-15 16:30:28 +03:00
parent 090bc3a167
commit 96b524bed8
2 changed files with 6 additions and 9 deletions

View file

@ -12,9 +12,6 @@
group: root group: root
mode: "0644" mode: "0644"
#- name: Create users
# ansible.builtin.include_tasks: create_users.yml
- name: Syctl tuning - name: Syctl tuning
ansible.builtin.include_tasks: sysctl_tuning.yml ansible.builtin.include_tasks: sysctl_tuning.yml

View file

@ -1,7 +1,7 @@
--- ---
- name: Установка зависимостей SELinux - name: Установка зависимостей SELinux
become: true become: true
package: ansible.builtin.package:
name: "{{ (ansible_facts['distribution_major_version'] | int >= 8) | ternary('python3-libselinux', 'libselinux-python') }}" name: "{{ (ansible_facts['distribution_major_version'] | int >= 8) | ternary('python3-libselinux', 'libselinux-python') }}"
state: present state: present
@ -9,11 +9,11 @@
ansible.posix.selinux: ansible.posix.selinux:
state: disabled state: disabled
- name: Explicitly specifying positional matched groups in replacement #- name: Explicitly specifying positional matched groups in replacement
ansible.builtin.replace: # ansible.builtin.replace:
path: /etc/ssh/sshd_config # path: /etc/ssh/sshd_config
regexp: ^(ListenAddress[ ]+)[^\n]+$ # regexp: ^(ListenAddress[ ]+)[^\n]+$
replace: \g<1>0.0.0.0 # replace: \g<1>0.0.0.0
# - name: Disable Root Login # - name: Disable Root Login
# template: # template: