-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
VMware: New module vmware_host_dns #47271
Conversation
Hi @ckotte, thank you for submitting this pull-request! |
@ckotte, just so you are aware we have a dedicated Working Group for vmware. |
@dagwieers @Akasurde I didn't want to update the "old" module |
This comment has been minimized.
This comment has been minimized.
dcafe3b
to
6041f11
Compare
We cannot simply remove a module, we need to follow a deprecation process. This means that users will be notified that the module may disappear in 4 versions from now. Another option is that we make the new module a drop-in replacement for the old one, by adding the parameters as aliases (or ghost parameters) so that they work exactly as before. In this case these ghost parameters or aliases could provide a deprecation-warning to the user so they have the time to modify their playbooks to the new design. (In this case we simply rename the old module to the new, so that the old name keeps on working as well) |
db80b7f
to
f4ccc15
Compare
Ok. I removed the old module, created a link, and some ghost parameters. Someone would just need to remove the code from the module and the symlink in 2.11, right? |
Yes, every time there's a new release, the code is being reviewed for deprecated stuff and cleaned up. That's why it's good to add a |
@ckotte I don't see the aliases (or ghost parameters) for:
Also |
1eb494e
to
4333aa2
Compare
4333aa2
to
457f50d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great module, but have some questions on differences between module definition and documentation
requirements: | ||
- python >= 2.6 | ||
- PyVmomi | ||
options: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the deprecated old change_hostname_to
and domainname
be mentioned as well? (i don't know the best protocol for ghost parameters)
['cluster_name', 'esxi_hostname'], | ||
], | ||
required_if=[ | ||
['type', 'static', ['host_name', 'domain', 'dns_servers', 'search_domains']], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably good to add ['type', 'dhcp', ['device']]
?
description: | ||
- The hostname to be used for the ESXi host. | ||
type: str | ||
required: True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These required parameters seem not required if i look at the module definition in the code? Only if the type is static? Probably best to update documentation accordingly for host_name
, domain
, dns_servers
and search_domains
. Will probably require some changes in the ensure
method as well
Or if they are required, the module definition should be updated.
|
||
- debug: var=vcsim | ||
|
||
- name: Wait for Flask controller to come up online |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
We recently did a refactoring of the functional test-suite, the goal is to be able to run it on a regular VMware environment, this instead of vcsim.
As a consequence, you should not handle vcsim in the functional test anymore, use the prepare_vmware_roles
role instead. e.g: https://github.com/ansible/ansible/blob/devel/test/integration/targets/vmware_drs_group/tasks/main.yml
You should also ensure the resources that are created during your test are properly removed at the end.
SUMMARY
vmware_host_dns
is a drop-in replacement for the old modulevmware_dns_config
.Compared to the other module, this module..:
host.config.network.netStackInstance
instead of deprecatedhost.configManager.networkSystem.dnsConfig
e.g.
"msg": "DNS server '10.168.1.10' added and '10.168.1.11' removed and the server sequence changed as well"
esxi_hostname
andcluster_name
optionsISSUE TYPE
COMPONENT NAME
vmware_host_dns
ANSIBLE VERSION
ADDITIONAL INFORMATION