mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
bb588bd777
* linting Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * more linting Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * change line length issues Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * replace yes with true in tasks Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * use manual line-wrapping because ansible-lint does not support it correctly. see https://github.com/ansible/ansible-lint/issues/2522 * use manual line-wrapping because ansible-lint does not support it correctly. see https://github.com/ansible/ansible-lint/issues/2522 Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * use manual line-wrapping because ansible-lint does not support it correctly. see https://github.com/ansible/ansible-lint/issues/2522 Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * add exception for task Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * remove trailing whitespace * add back deleted params Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * add back deleted params Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com> * add back tasks Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
17 lines
475 B
YAML
17 lines
475 B
YAML
---
|
|
- name: Get user accounts | os-09
|
|
ansible.builtin.command: "awk -F: '{print $1}' /etc/passwd"
|
|
changed_when: false
|
|
check_mode: false
|
|
register: users_accounts
|
|
|
|
- name: Delete rhosts-files from system | os-09
|
|
ansible.builtin.file:
|
|
dest: ~{{ item }}/.rhosts
|
|
state: absent
|
|
loop: "{{ users_accounts.stdout_lines | flatten | default([]) }}"
|
|
|
|
- name: Delete hosts.equiv from system | os-01
|
|
ansible.builtin.file:
|
|
dest: /etc/hosts.equiv
|
|
state: absent
|