mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-02 04:44:42 +00:00
Merge pull request #1099 from rjeffman/roles_disallow_fqdn_domain_match
Don't allow the FQDN to match the domain on server installs
This commit is contained in:
@@ -521,6 +521,11 @@ def main():
|
|||||||
ansible_module.fail_json(
|
ansible_module.fail_json(
|
||||||
msg="NTP configuration cannot be updated during promotion")
|
msg="NTP configuration cannot be updated during promotion")
|
||||||
|
|
||||||
|
# host_name an domain_name must be different at this point.
|
||||||
|
if options.host_name.lower() == options.domain_name.lower():
|
||||||
|
ansible_module.fail_json(
|
||||||
|
msg="hostname cannot be the same as the domain name")
|
||||||
|
|
||||||
# done #
|
# done #
|
||||||
|
|
||||||
ansible_module.exit_json(
|
ansible_module.exit_json(
|
||||||
|
|||||||
@@ -1055,6 +1055,11 @@ def main():
|
|||||||
|
|
||||||
domain_name = domain_name.lower()
|
domain_name = domain_name.lower()
|
||||||
|
|
||||||
|
# Both host_name and domain_name are lowercase at this point.
|
||||||
|
if host_name == domain_name:
|
||||||
|
ansible_module.fail_json(
|
||||||
|
msg="hostname cannot be the same as the domain name")
|
||||||
|
|
||||||
if not options.realm_name:
|
if not options.realm_name:
|
||||||
realm_name = domain_name.upper()
|
realm_name = domain_name.upper()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user