Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nsxt_ip_pools not idempotent #64

Open
simplygeekuk opened this issue Mar 23, 2019 · 1 comment
Open

nsxt_ip_pools not idempotent #64

simplygeekuk opened this issue Mar 23, 2019 · 1 comment

Comments

@simplygeekuk
Copy link

The nsxt_ip_pools module always updates the resource, even when nothing has been changed. The message "ip pool with pool id a7b7d048-87f5-4848-a585-c2ffe618f9df updated." is displayed on every execution.

changed: [sg1-nsx002] => {
"body": "{u'subnets': [{u'cidr': u'10.1.111.0/24', u'dns_nameservers': [], u'allocation_ranges': [{u'start': u'10.1.111.10', u'end': u'10.1.111.20'}]}], u'_system_owned': False, u'display_name': u'SiteA-CMP-VxLAN', u'_create_user': u'admin', u'_revision': 2, u'_protection': u'NOT_PROTECTED', u'_create_time': 1553353847871, u'_last_modified_time': 1553354083398, u'_last_modified_user': u'admin', u'id': u'a7b7d048-87f5-4848-a585-c2ffe618f9df', u'resource_type': u'IpPool'}",
"changed": true,
"id": "a7b7d048-87f5-4848-a585-c2ffe618f9df",
"invocation": {
"module_args": {
"display_name": "SiteA-CMP-VxLAN",
"hostname": "sg1-nsx002.sgroot.local",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"state": "present",
"subnets": [
{
"allocation_ranges": [
{
"end": "10.1.111.20",
"start": "10.1.111.10"
}
],
"cidr": "10.1.111.0/24"
}
],
"tags": null,
"username": "admin",
"validate_certs": false
}
},
"message": "ip pool with pool id a7b7d048-87f5-4848-a585-c2ffe618f9df updated."
}

@laidbackware
Copy link
Contributor

This is because the comparison does not take into account bland DNS entries which the API server always return on a get, even if DNS was not configured.
A short term workaround is to set DNS servers on the IP pool.

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

No branches or pull requests

2 participants