28 lines
791 B
YAML
28 lines
791 B
YAML
---
|
|
- name: Установка зависимостей SELinux
|
|
become: true
|
|
package:
|
|
name: "{{ (ansible_facts['distribution_major_version'] | int >= 8) | ternary('python3-libselinux', 'libselinux-python') }}"
|
|
state: present
|
|
|
|
#- name: Ensure libselinux is installed on the control node
|
|
# delegate_to: localhost
|
|
# become: false
|
|
# ansible.builtin.pip:
|
|
# name: libselinux
|
|
|
|
- name: Disable SELinux
|
|
ansible.posix.selinux:
|
|
state: disabled
|
|
|
|
- name: Explicitly specifying positional matched groups in replacement
|
|
ansible.builtin.replace:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: ^(ListenAddress[ ]+)[^\n]+$
|
|
replace: \g<1>0.0.0.0
|
|
|
|
# - name: Disable Root Login
|
|
# template:
|
|
# src: permitrootlogin.conf.j2
|
|
# dest: /etc/ssh/sshd_config.d/01-permitrootlogin.conf
|