-
Notifications
You must be signed in to change notification settings - Fork 338
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
WIP - DO - NOT - MERGE - vmware_guest: honor esxi_hostname without template #357
WIP - DO - NOT - MERGE - vmware_guest: honor esxi_hostname without template #357
Conversation
Use the `esxi_hostname` key to target the right host, even if `template` key is not set.
@goneri: Greetings! Thanks for taking the time to open this pullrequest. In order for the community to handle your pullrequest effectively, we need a bit more information. Here are the items we could not find in your description:
Please set the description of this pullrequest with this template: |
@@ -3091,10 +3091,11 @@ def deploy_vm(self): | |||
clonespec = None | |||
clone_method = None | |||
try: | |||
# Only select specific host when ESXi hostname is provided | |||
if self.params['esxi_hostname']: | |||
self.relospec.host = self.select_host() |
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.
I didn't test this, but it looks like the else branch doesn't use self.relospec
. I think you need to define the hostname to deploy to in self.relospec
in the if branch, and in self.configspec
in the else branch.
As I've said, I didn't test this. I'm just trying to understand what the code does and maybe I'm wrong.
I found where was the issue and proposed a PR # to fix it #400. So this PR can be closed. Thanks @goneri and @mariolenz for your input! |
Great, thanks @xenlo :-) |
Use the
esxi_hostname
key to target the right host, even iftemplate
key is not set.