identity_domain module does rename domain if ID is suppliedlied for "name" attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ansible-collections-openstack |
New
|
Undecided
|
Unassigned |
Bug Description
Issue description
In some cases, identity_domain may rename the domain name to it's UUID if UUID is supplied to the `name` attribute.
Current behaviour
Good example of that is `default` domain. So this sample playbook can reproduce the behaviour of renaming domain Default to it's UUID:
- hosts: localhost
tasks:
- name: Ensure domain exists
openstack
cloud: default
state: present
name: Default
- name: Get default domain
openstack
cloud: default
name: default
register: currentstate
- debug:
var: currentstate
- name: Unintentionally change domain name
openstack
cloud: default
state: present
name: default
- name: Get default domain
openstack
cloud: default
name: default
register: laststate
- debug:
var: laststate
The output will be follpwing:
TASK [Ensure domain exists] *******
ok: [localhost]
TASK [Get default domain] *******
ok: [localhost]
TASK [debug] *******
ok: [localhost] => {
"currentstate": {
"changed": false,
"domains": [
{
},
}
],
"failed": false
}
}
TASK [Unintentionally change domain name] *******
changed: [localhost]
TASK [Get default domain] *******
ok: [localhost]
TASK [debug] *******
ok: [localhost] => {
"laststate": {
"changed": false,
"domains": [
{
},
}
],
"failed": false
}
}
PLAY RECAP *******
localhost : ok=7 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Expected behavior
It is expected, that name of the domain is pretty much immutable in current setup, since there is no means to supply module explicitly with domain UUID AND name, signalizing that name should be changed.
So atm there should not be really a way to update the domain name without introducing another attribute for UUID explicitly.
Related bug report: https:/ /bugs.launchpad .net/openstack- ansible/ +bug/2064718