From d2e1d2ee5681a8eb7b78f6b5ec91bfc38a3b4be0 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Wed, 12 Jun 2024 10:10:27 +0200 Subject: [PATCH] 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 --- tasks/rhel7stig/accounts.yml | 14 +++++++------- tasks/rhel7stig/file_perms.yml | 2 +- tasks/rhel7stig/main.yml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/rhel7stig/accounts.yml b/tasks/rhel7stig/accounts.yml index ddff52ed..c08430e3 100644 --- a/tasks/rhel7stig/accounts.yml +++ b/tasks/rhel7stig/accounts.yml @@ -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 diff --git a/tasks/rhel7stig/file_perms.yml b/tasks/rhel7stig/file_perms.yml index 11a06917..8c7b6081 100644 --- a/tasks/rhel7stig/file_perms.yml +++ b/tasks/rhel7stig/file_perms.yml @@ -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 diff --git a/tasks/rhel7stig/main.yml b/tasks/rhel7stig/main.yml index ab886a43..e919e48f 100644 --- a/tasks/rhel7stig/main.yml +++ b/tasks/rhel7stig/main.yml @@ -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