From 16d4f46f78920ef5f54da04ecd4dd8651f48d630 Mon Sep 17 00:00:00 2001 From: Yannik Sembritzki Date: Tue, 2 Jul 2024 00:39:26 +0200 Subject: [PATCH] Improve task name --- plugins/module_utils/_ADObject.psm1 | 4 ++-- plugins/modules/group.yml | 1 + tests/integration/targets/group/tasks/tests.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/_ADObject.psm1 b/plugins/module_utils/_ADObject.psm1 index a1fb348..e29fc8e 100644 --- a/plugins/module_utils/_ADObject.psm1 +++ b/plugins/module_utils/_ADObject.psm1 @@ -543,7 +543,7 @@ Function ConvertTo-AnsibleADDistinguishedName { [string] $Server, - [boolean] + [Switch] $NestedGroupFlatten, [PSCredential] @@ -617,7 +617,7 @@ Function ConvertTo-AnsibleADDistinguishedName { $object = Get-AnsibleADObject @getParams if ($object) { if ($NestedGroupFlatten -and $object.ObjectClass -eq "group") { - $dns = Get-ADGroupMember $object -Recursive | Select-Object -ExpandProperty DistinguishedName + $dns = Get-ADGroupMember @getParams -Recursive $object | Select-Object -ExpandProperty DistinguishedName } else { $dns = $object | Select-Object -ExpandProperty DistinguishedName diff --git a/plugins/modules/group.yml b/plugins/modules/group.yml index 63c5cab..e8d7116 100644 --- a/plugins/modules/group.yml +++ b/plugins/modules/group.yml @@ -87,6 +87,7 @@ DOCUMENTATION: - Flattens nested groups. type: bool default: false + version_added: 1.7.0 sam_account_name: description: - The C(sAMAccountName) value to set for the group. diff --git a/tests/integration/targets/group/tasks/tests.yml b/tests/integration/targets/group/tasks/tests.yml index 6c69aca..0c835fe 100644 --- a/tests/integration/targets/group/tasks/tests.yml +++ b/tests/integration/targets/group/tasks/tests.yml @@ -373,7 +373,7 @@ - my_user_2 register: sub_group - - name: set members while flattening sub group + - name: set members with sub group flattening group: name: MyGroup flatten: true