Skip to content
Snippets Groups Projects
Commit 2253a415 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

library/ipadiscovery.py: Allow to use server only also

The discovery was not working if a server has been specified. The domain has
been needed additionally. The domain is now gathered from the server name if
it is missing in this case.
parent 47895954
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,10 @@ def main():
module.fail_json(
msg="Invalid hostname, '%s' must not be used." % hostname)
# Get domain from first server if domain is not set, but there are servers
if opt_domain is None and len(opt_servers) > 0:
opt_domain = opt_servers[0][opt_servers[0].find(".")+1:]
# Create the discovery instance
ds = ipadiscovery.IPADiscovery()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment