2017-04-24 12:22:51 +00:00
|
|
|
---
|
2018-12-17 12:50:15 +00:00
|
|
|
- name: Get user accounts | os-09
|
2017-04-24 12:22:51 +00:00
|
|
|
command: "awk -F: '{print $1}' /etc/passwd"
|
|
|
|
changed_when: False
|
2018-12-17 12:50:15 +00:00
|
|
|
check_mode: False
|
2017-04-24 12:22:51 +00:00
|
|
|
register: users
|
|
|
|
|
2018-12-17 12:50:15 +00:00
|
|
|
- name: delete rhosts-files from system | os-09
|
|
|
|
file:
|
|
|
|
dest: '~{{ item }}/.rhosts'
|
|
|
|
state: 'absent'
|
|
|
|
with_flattened: '{{ users.stdout_lines | default([]) }}'
|
2017-04-24 12:22:51 +00:00
|
|
|
|
2018-12-17 12:50:15 +00:00
|
|
|
- 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.stdout_lines | default([]) }}'
|