Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit 0fba01c

Browse files
committed
Bug 1162454 - default hostnames should use infra zone if provided
https://bugzilla.redhat.com/show_bug.cgi?id=1162454 - If no hostname is provided and dns_infrastructure_zone is configured the default hostnames should use dns_infrastructure_zone instead of domain variable
1 parent e40f338 commit 0fba01c

File tree

1 file changed

+32
-14
lines changed

1 file changed

+32
-14
lines changed

manifests/init.pp

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -769,27 +769,49 @@
769769
$jenkins_repo_base = undef,
770770
$optional_repo = undef,
771771
$domain = 'example.com',
772-
$broker_hostname = "broker.${domain}",
773-
$node_hostname = "node.${domain}",
774-
$nameserver_hostname = "ns1.${domain}",
775-
$msgserver_hostname = "msgserver.${domain}",
776-
$datastore_hostname = "mongodb.${domain}",
777-
$datastore1_ip_addr = undef,
778-
$datastore2_ip_addr = undef,
779-
$datastore3_ip_addr = undef,
780-
$nameserver_ip_addr = $::ipaddress,
781772
$bind_key = '',
782773
$bind_key_algorithm = 'HMAC-MD5',
783774
$bind_krb_keytab = '',
784775
$bind_krb_principal = '',
776+
$dns_infrastructure_zone = '',
777+
$dns_infrastructure_key = '',
778+
$dns_infrastructure_key_algorithm = 'HMAC-MD5',
779+
$dns_infrastructure_names = [],
780+
$broker_hostname = $dns_infrastructure_zone ? {
781+
'' => "broker.${domain}",
782+
default => "broker.${dns_infrastructure_zone}",
783+
},
784+
$node_hostname = $dns_infrastructure_zone ? {
785+
'' => "node.${domain}",
786+
default => "node.${dns_infrastructure_zone}",
787+
},
788+
$nameserver_hostname = $dns_infrastructure_zone ? {
789+
'' => "ns1.${domain}",
790+
default => "ns1.${dns_infrastructure_zone}",
791+
},
792+
$msgserver_hostname = $dns_infrastructure_zone ? {
793+
'' => "msgserver.${domain}",
794+
default => "msgserver.${dns_infrastructure_zone}",
795+
},
796+
$datastore_hostname = $dns_infrastructure_zone ? {
797+
'' => "mongodb.${domain}",
798+
default => "mongodb.${dns_infrastructure_zone}",
799+
},
800+
$datastore1_ip_addr = undef,
801+
$datastore2_ip_addr = undef,
802+
$datastore3_ip_addr = undef,
803+
$nameserver_ip_addr = $::ipaddress,
785804
$aws_access_key_id = '',
786805
$aws_secret_key = '',
787806
$aws_zone_id = '',
788807
$broker_ip_addr = $::ipaddress,
789808
$broker_cluster_members = undef,
790809
$broker_cluster_ip_addresses = undef,
791810
$broker_virtual_ip_address = undef,
792-
$broker_virtual_hostname = "broker.${domain}",
811+
$broker_virtual_hostname = $dns_infrastructure_zone ? {
812+
'' => "broker.${domain}",
813+
default => "broker.${dns_infrastructure_zone}",
814+
},
793815
$load_balancer_master = false,
794816
$load_balancer_auth_password = 'changeme',
795817
$node_ip_addr = $::ipaddress,
@@ -883,10 +905,6 @@
883905
$conf_nameserver_upstream_dns = ['8.8.8.8'],
884906
$install_login_shell = false,
885907
$register_host_with_nameserver = false,
886-
$dns_infrastructure_zone = '',
887-
$dns_infrastructure_key = '',
888-
$dns_infrastructure_key_algorithm = 'HMAC-MD5',
889-
$dns_infrastructure_names = [],
890908
$update_network_conf_files = true,
891909
$install_cartridges = $ose_version ? {
892910
undef => ['10gen-mms-agent','cron','diy','haproxy','mongodb','nodejs',

0 commit comments

Comments
 (0)