--- - name: Установка зависимостей SELinux become: true package: name: "{{ (ansible_facts['distribution_major_version'] | int >= 8) | ternary('python3-libselinux', 'libselinux-python') }}" state: present - 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