You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TASK [devsec.hardening.os_hardening : Set ownership of root user home directory(s) to 0700] ************************************
fatal: [NextCloud_test_node]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 4\n\nThe error appears to be in '/root/.ansible/collections/ansible_collections/devsec/hardening/roles/os_hardening/tasks/user_accounts.yml': line 52, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set ownership of root user home directory(s) to 0700\n ^ here\n"}
Reproduction steps
$ ansible-galaxy collection install devsec.hardening
$ cat /etc/ansible/endurecimiento.yml
---
- name: Aplicar endurecimiento de seguridad
hosts: NextCloud_test_node
collections:
- devsec.hardening
tasks:
- name: Ejecutar endurecimiento de seguridad del SO
include_role:
name: os_hardening
- name: Ejecutar endurecimiento de seguridad del ssh
include_role:
name: ssh_hardening
Current Behavior
I obtained the error:
TASK [devsec.hardening.os_hardening : Set ownership of root user home directory(s) to 0700] ************************************
fatal: [NextCloud_test_node]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: list object has no element 4\n\nThe error appears to be in '/root/.ansible/collections/ansible_collections/devsec/hardening/roles/os_hardening/tasks/user_accounts.yml': line 52, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set ownership of root user home directory(s) to 0700\n ^ here\n"}
Thank you for this report, this is likely related to a very recent change in our collection. To debug this further it would be very helpful if you cold post the first few lines of the file /etc/passwd of your server. Please be mindful that this file could contain possibly confidential information so please review the contents before posting! If you are not comfortable with posting the contents I want to ask if you have a user(s) with the UID 0?
Description
Reproduction steps
Current Behavior
I obtained the error:
Expected Behavior
No fails
OS / Environment
Ubuntu-20.04
Ansible Version
Collection Version
$ ansible-galaxy collection list devsec.hardening # /root/.ansible/collections/ansible_collections Collection Version ---------------- ------- devsec.hardening 8.6.0
The text was updated successfully, but these errors were encountered: