Skip to content

Add demo for microsoft.ad.ldap inventory plugin - #379

Merged
zjleblanc merged 5 commits into
ansible:mainfrom
zjleblanc:issue/375-ldap-inventory-sync
Oct 28, 2026
Merged

zjleblanc merged 5 commits into
ansible:mainfrom
zjleblanc:issue/375-ldap-inventory-sync

Conversation

@zjleblanc

Copy link
Copy Markdown
Contributor

Addresses #375

Adding configuration-as-code to tag on microsoft.ad.ldap inventory plugin demo based on the Setup Windows Active Directory Domain workflow

@zjleblanc

Copy link
Copy Markdown
Contributor Author

Successful Workflow Job

Screenshot 2026-10-23 at 12 08 32 PM

Dynamic Inventory Sync (microsoft.ad.ldap)

Screenshot 2026-10-23 at 12 08 43 PM

@l3acon l3acon self-assigned this Oct 23, 2026
@IPvSean

IPvSean commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

let me know when you want a review

@zjleblanc

Copy link
Copy Markdown
Contributor Author

@IPvSean this is ready for review - I need to add docs, but the workflow itself is ready

@IPvSean IPvSean left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice CaC wiring for microsoft.ad.ldap — credential type + env injectors, create-domain refresh of the LDAP cred, inventory source gated so seed does not sync before AD exists, and the workflow fan-out (AWS inventory → PowerShell / LDAP inventory → Kerberos) is a clear demo of the plugin.

A few items before merge (docs you already flagged):

  1. Docs / mermaid — docs/_data/demos.yml and windows/docs/windows-setup-ad-domain.md still show a single “Domain Inventory Sync” feeding both validations. Worth updating with the AWS vs AD LDAP split when you add docs.
  2. LDAP on 0.0.0.0/0 — opening TCP/389 world-wide is what makes Controller→DC sync work from outside the VPC, but it is cleartext LDAP to the internet. Worth a one-line note in the demo docs (and consider whether LDAPS/636 is viable for this demo later).
  3. ansible_host reachability — the plugin defaults ansible_host to dNSHostName (e.g. dc01.ansible.local). Kerberos Validation now targets Windows AD Inventory; how does WinRM from AAP resolve/reach those names in the usual RHDP/public-IP setup? If you are relying on something beyond default DNS, call it out in docs or compose a reachable host var.

Workflow shape and the aap_configuration_dispatcher_exclude_roles: [controller_inventory_source_update] scoping look right for windows-only seed. Happy to approve once docs land (or if you want to merge workflow-first and follow with docs).

Comment thread cloud/create_vpc.yml
- 22 # SSH
- 5986 # WinRM
- 88 # Kerberos Authentication
- 389 # LDAP

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This opens LDAP to the world (the VPC-scoped rule already had 389). Needed so AAP outside the VPC can sync, but it is cleartext LDAP on 0.0.0.0/0 — please call that out in the demo docs (same class of footgun as demo SNMP public).

ansible_connection: "'winrm'"
ansible_winrm_transport: "'kerberos'"
ansible_winrm_server_cert_validation: "'ignore'"
ansible_port: "5986"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin default sets ansible_host from dNSHostName (typically *.ansible.local). Kerberos Validation in the workflow runs against Windows AD Inventory with limit: all — does WinRM from Controller actually reach those names in the standard public-IP APD lab, or do you need a compose/ansible_host that maps to something reachable (or docs that DNS/VPN is assumed)?

Comment thread windows/setup.yml
description: Hosts discovered from Active Directory via microsoft.ad.ldap

# Disable AD inventory sync during setup; dependent on Setup Active Directory Domain workflow
aap_configuration_dispatcher_exclude_roles: [controller_inventory_source_update]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good — because setup_demo.yml loads {{ demo }}/setup.yml per play, this exclude stays windows-scoped and will not disable inventory sync for other demos. Matches the follow-up commit intent.

@jce-redhat jce-redhat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no issues testing the workflow additions

@jce-redhat

Copy link
Copy Markdown
Collaborator

will hold off merging if you are adding docs

@zjleblanc
zjleblanc merged commit 2ebd4e4 into ansible:main Oct 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants