Rename internal parameter user_list to hardening_user_list

The user_list parameter is a pure internal parameter. The user_list
parameter conflicts with the parameter of one of our roles. As this
is a pure internal parameter, it can simply be renamed.

Change-Id: I87ddb138ba78584ba63f463ec304460c970206ad
This commit is contained in:
Christian Berendt 2024-06-12 10:10:27 +02:00
parent e7398242fb
commit d2e1d2ee56
3 changed files with 9 additions and 9 deletions

View File

@ -164,10 +164,10 @@
debug:
msg: >
The following users have GIDs in /etc/passwd that do not exist in /etc/group:
{{ user_list.users | selectattr('group', 'equalto', False) | map(attribute='name') | join(', ') }}
{{ hardening_user_list.users | selectattr('group', 'equalto', False) | map(attribute='name') | join(', ') }}
when:
- user_list is defined
- user_list.users | selectattr('group', 'equalto', False) | list | length > 0
- hardening_user_list is defined
- hardening_user_list.users | selectattr('group', 'equalto', False) | list | length > 0
tags:
- accounts
- low
@ -200,10 +200,10 @@
debug:
msg: |
The following users do not have a home directory assigned:
{{ user_list.users | selectattr('dir', 'equalto', '') | map(attribute='name') | join(', ') }}
{{ hardening_user_list.users | selectattr('dir', 'equalto', '') | map(attribute='name') | join(', ') }}
when:
- user_list is defined
- user_list.users | selectattr('dir', 'equalto', '') | map(attribute='name') | list | length > 0
- hardening_user_list is defined
- hardening_user_list.users | selectattr('dir', 'equalto', '') | map(attribute='name') | list | length > 0
tags:
- accounts
- medium
@ -214,7 +214,7 @@
path: "{{ item['dir'] }}"
when:
- item['dir'] | length > 0
with_items: "{{ user_list.users }}"
with_items: "{{ hardening_user_list.users }}"
register: home_directory_checks
tags:
- accounts

View File

@ -102,7 +102,7 @@
- item.uid >= 1000
- item.name != 'nobody'
- security_set_home_directory_permissions_and_owners | bool
with_items: "{{ user_list.users | selectattr('uid', 'greaterthan', 999) | list }}"
with_items: "{{ hardening_user_list.users | selectattr('uid', 'greaterthan', 999) | list }}"
tags:
- medium
- file_perms

View File

@ -40,7 +40,7 @@
- name: Get user data for all users on the system
get_users:
min_uid: 0
register: user_list
register: hardening_user_list
check_mode: no
tags:
- always