add user AD - fail module/action "win_domain_user"

Hi,
I am executing task to add users to local AD domain. I use community.windows task but it fails →

"ERROR! couldn’t resolve module/action '‘win_domain_user’. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in ‘/runner/project/add_user.yml’: line 6, column 7 …"

Playbook:

  • name: Add User AD
    hosts: all

tasks:

  • name: Create AD User
    win_domain_user:
    name: peter

ENVIRONMENT

  • AWX version: 20.0.0

  • AWX install method: operator

  • AWX deployment target: kubernetes - kubectl

  • ansible [core 2.12.2.post0]
    config file = None
    configured module search path = [‘/home/runner/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
    ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
    ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
    executable location = /usr/local/bin/ansible
    python version = 3.8.12 (default, Sep 21 2021, 00:10:52) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
    jinja version = 2.10.3
    libyaml = True

  • bash-4.4$ ansible-galaxy collection list

    /usr/share/ansible/collections/ansible_collections

    Collection Version


    amazon.aws 3.1.1
    ansible.posix 1.3.0
    ansible.windows 1.9.0
    awx.awx 19.4.0
    azure.azcollection 1.11.0
    community.vmware 2.1.0
    google.cloud 1.0.2
    kubernetes.core 2.2.3
    openstack.cloud 1.7.0
    ovirt.ovirt 1.6.6
    redhatinsights.insights 1.0.5
    theforeman.foreman 3.1.0

    /home/runner/.ansible/collections/ansible_collections

    Collection Version


    ansible.windows 1.9.0
    community.windows 1.9.0

  • repository: github CMS
    where is the error?
    thanks

Hi there,

This looks like a general ansible question, not an AWX question. There is an ansible mailing list for future questions like this you might have (https://groups.google.com/g/ansible-devel).
That being said, it looks like you need to get win_domain_user from the community.windows collection (more on that here: https://docs.ansible.com/ansible/latest/collections/community/windows/win_domain_user_module.html).

Hope that helps
AWX Team