SUMMARY
When trying to add a computer to an existing Active Directory group, the play fails with error "New-ADGroup failed: The specified group already exists"
ISSUE TYPE
COMPONENT NAME
microsoft.ad.group module
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows server 2025
STEPS TO REPRODUCE
- name: Define name of computer to be added to group
ansible.builtin.set_fact:
group_member: "{{ ansible_netbios_name }}$"
- name: Add computer to group in AD
microsoft.ad.group:
name: "{{ existing_group_name }}"
scope: global
members:
add:
- "{{ group_member }}"
domain_username: "{{ domain_username }}"
domain_password: "{{ domain_user_password }}"
delegate_to: "{{ management_server_with_ActiveDirectory_module }}"
EXPECTED RESULTS
The computer to be added to the active directory group while preserving existing members
ACTUAL RESULTS
Fails with error "New-ADGroup failed: The specified group already exists"
SUMMARY
When trying to add a computer to an existing Active Directory group, the play fails with error "New-ADGroup failed: The specified group already exists"
ISSUE TYPE
COMPONENT NAME
microsoft.ad.group module
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows server 2025
STEPS TO REPRODUCE
EXPECTED RESULTS
The computer to be added to the active directory group while preserving existing members
ACTUAL RESULTS
Fails with error "New-ADGroup failed: The specified group already exists"