mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
23 lines
611 B
YAML
23 lines
611 B
YAML
---
|
|
- name: Get user accounts | os-09
|
|
command: "awk -F: '{print $1}' /etc/passwd"
|
|
changed_when: false
|
|
check_mode: false
|
|
register: users_accounts
|
|
|
|
- name: delete rhosts-files from system | os-09
|
|
file:
|
|
dest: '~{{ item }}/.rhosts'
|
|
state: 'absent'
|
|
with_flattened: '{{ users_accounts.stdout_lines | default([]) }}'
|
|
|
|
- name: delete hosts.equiv from system | os-01
|
|
file:
|
|
dest: '/etc/hosts.equiv'
|
|
state: 'absent'
|
|
|
|
- name: delete .netrc-files from system | os-09
|
|
file:
|
|
dest: '~{{ item }}/.netrc'
|
|
state: 'absent'
|
|
with_flattened: '{{ users_accounts.stdout_lines | default([]) }}'
|