public-health-ch/ansible/roles/dev-sec.os-hardening/tasks/rhosts.yml

14 lines
430 B
YAML
Raw Normal View History

2017-04-24 12:22:51 +00:00
---
- name: Get user accounts | DTAG SEC Req 3.21-4
command: "awk -F: '{print $1}' /etc/passwd"
changed_when: False
check_mode: no
register: users
- name: delete rhosts-files from system | DTAG SEC Req 3.21-4
file: dest='~{{ item }}/.rhosts' state=absent
with_items: '{{ users.stdout_lines | default(omit) }}'
- name: delete hosts.equiv from system | DTAG SEC Req 3.21-4
file: dest='/etc/hosts.equiv' state=absent