mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-23 09:14:43 +00:00
Fix errors when ipaservers variable is not set
This commit is contained in:
@@ -306,8 +306,9 @@ def main():
|
|||||||
|
|
||||||
# Get domain from first server if domain is not set, but if there are
|
# Get domain from first server if domain is not set, but if there are
|
||||||
# servers
|
# servers
|
||||||
if options.domain_name is None and len(options.servers) > 0:
|
if options.domain_name is None and options.servers is not None:
|
||||||
options.domain_name = options.servers[0][options.servers[0].find(".")+1:]
|
if len(options.servers) > 0:
|
||||||
|
options.domain_name = options.servers[0][options.servers[0].find(".")+1:]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self = options
|
self = options
|
||||||
@@ -324,7 +325,8 @@ def main():
|
|||||||
|
|
||||||
### ServiceInstallInterface ###
|
### ServiceInstallInterface ###
|
||||||
|
|
||||||
validate_domain_name(options.domain_name)
|
if options.domain_name:
|
||||||
|
validate_domain_name(options.domain_name)
|
||||||
|
|
||||||
if options.realm_name:
|
if options.realm_name:
|
||||||
argspec = inspect.getargspec(validate_domain_name)
|
argspec = inspect.getargspec(validate_domain_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user