After adding the role manually it PASSES that task but I'm very curious why it failed in the first place. 

$ openstack role add --user=magnum_trustee_domain_admin --user-domain magnum --domain magnum admin

My ansible and kolla-ansible versions are following: 

# ansible --version
ansible [core 2.14.11]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

# kolla-ansible --version
16.1.1


On Fri, Feb 23, 2024 at 10:25 PM Satish Patel <satish.txt@gmail.com> wrote:
fatal: [os-eng-ctrl-01]: FAILED! => {
    "action": "os_user_role",
    "changed": false,
    "extra_data": {
        "data": null,
        "details": "None",
        "response": "None"
    },
    "invocation": {
        "module_args": {
            "api_timeout": null,
            "auth": {
                "auth_url": "https://openstack-eng.example.com:5000",
                "domain_name": "default",
                "password": "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "project_name": "admin",
                "user_domain_name": "default",
                "username": "admin"
            },
            "auth_type": null,
            "ca_cert": "",
            "cacert": "",
            "client_cert": null,
            "client_key": null,
            "domain": "9fe7eaf3d3184dfd8a04a091dd3801be",
            "endpoint_type": "internal",
            "group": null,
            "interface": "internal",
            "project": null,
            "region_name": "eng",
            "role": "admin",
            "sdk_log_level": "INFO",
            "sdk_log_path": null,
            "state": "present",
            "system": null,
            "timeout": 180,
            "user": "magnum_trustee_domain_admin",
            "validate_certs": null,
            "wait": true
        }
    },
    "msg": "Must specify either a user or a group"
}

This is where the module failed. Why is it asking to specify a user or group? 

On Fri, Feb 23, 2024 at 5:42 PM Satish Patel <satish.txt@gmail.com> wrote:
Folks,

I am deploying magnum using openstack release 2023.1 but getting this error. But I have a similar deployment running in another datacenter which didn't give any error. What could be the problem?

TASK [magnum : Creating Magnum trustee user] ****************************************************************************************
ok: [os-eng-ctrl-01]

TASK [magnum : Creating Magnum trustee user role] ***********************************************************************************
fatal: [os-eng-ctrl-01]: FAILED! => {"action": "os_user_role", "changed": false, "extra_data": {"data": null, "details": "None", "response": "None"}, "msg": "Must specify either a user or a group"}