This commit is contained in:
parent
82bdb9a37d
commit
806565d2b3
1 changed files with 32 additions and 30 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- block:
|
- name: base setup
|
||||||
|
block:
|
||||||
- name: Include vars for {{ ansible_os_family }}
|
- name: Include vars for {{ ansible_os_family }}
|
||||||
ansible.builtin.include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
|
ansible.builtin.include_vars: "{{ ansible_os_family }}_{{ ansible_distribution_major_version }}.yml"
|
||||||
|
|
||||||
|
|
@ -179,36 +180,37 @@
|
||||||
regexp: '^#compress'
|
regexp: '^#compress'
|
||||||
replace: 'compress'
|
replace: 'compress'
|
||||||
|
|
||||||
- block:
|
- name: TCPWrapper setup
|
||||||
- name: Verify if hosts.deny TCP_Wrappers file exists
|
block:
|
||||||
ansible.builtin.stat:
|
- name: Verify if hosts.deny TCP_Wrappers file exists
|
||||||
path: "/etc/hosts.deny"
|
ansible.builtin.stat:
|
||||||
register: hostsdeny
|
path: "/etc/hosts.deny"
|
||||||
check_mode: false
|
register: hostsdeny
|
||||||
- name: Verify if hosts.allow TCP_Wrappers file exists
|
check_mode: false
|
||||||
ansible.builtin.stat:
|
- name: Verify if hosts.allow TCP_Wrappers file exists
|
||||||
path: "/etc/hosts.allow"
|
ansible.builtin.stat:
|
||||||
register: hostsallow
|
path: "/etc/hosts.allow"
|
||||||
check_mode: false
|
register: hostsallow
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
- name: Install hosts.deny TCP_Wrappers file
|
- name: Install hosts.deny TCP_Wrappers file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "hosts.deny"
|
src: "hosts.deny"
|
||||||
dest: "/etc/hosts.deny"
|
dest: "/etc/hosts.deny"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- not hostsdeny.stat.exists
|
- not hostsdeny.stat.exists
|
||||||
- name: Install hosts.allow TCP_Wrappers file
|
- name: Install hosts.allow TCP_Wrappers file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "hosts.allow"
|
src: "hosts.allow"
|
||||||
dest: "/etc/hosts.allow"
|
dest: "/etc/hosts.allow"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- not hostsallow.stat.exists
|
- not hostsallow.stat.exists
|
||||||
when:
|
when:
|
||||||
- ansible_os_family == "RedHat"
|
- ansible_os_family == "RedHat"
|
||||||
- ansible_distribution_major_version < '9'
|
- ansible_distribution_major_version < '9'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue