diff options
author | Tim Rozet <trozet@redhat.com> | 2015-09-09 17:59:42 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2015-09-11 21:49:08 +0000 |
commit | 2c06022aa12ec8fc0ac3e50de36b900c92bf9817 (patch) | |
tree | 1beebd6318f0c4ed9f06f13e93d458e3beb8e722 /foreman/ci/vm_nodes_provision.sh | |
parent | 4cc019754afda26022f440a973513518bada9b85 (diff) |
Allows domain name to be configured
Users may now provide domain_name in the ksgen settings file (along with
setting the correct and respective hostnames). This domain name will be
used for all of the deployed machines.
JIRA: BGS-86
Change-Id: I34b6da07dd565648399ea7a1abf2abe1ae62d91a
Signed-off-by: Tim Rozet <trozet@redhat.com>
(cherry picked from commit 1089c79563e61589d105accc3067f6ebbd3020ed)
Diffstat (limited to 'foreman/ci/vm_nodes_provision.sh')
-rwxr-xr-x | foreman/ci/vm_nodes_provision.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/foreman/ci/vm_nodes_provision.sh b/foreman/ci/vm_nodes_provision.sh index e64c0ad..0754e31 100755 --- a/foreman/ci/vm_nodes_provision.sh +++ b/foreman/ci/vm_nodes_provision.sh @@ -19,6 +19,7 @@ green=`tput setaf 2` host_name=REPLACE dns_server=REPLACE host_ip=REPLACE +domain_name=REPLACE ##END VARS ##set hostname @@ -35,7 +36,7 @@ fi ##modify /etc/resolv.conf to point to foreman echo "${blue} Configuring resolv.conf with DNS: $dns_server ${reset}" cat > /etc/resolv.conf << EOF -search ci.com opnfv.com +search ci.com $domain_name nameserver $dns_server nameserver 8.8.8.8 @@ -94,10 +95,10 @@ pluginsync = true report = true ignoreschedules = true daemon = false -ca_server = foreman-server.opnfv.com +ca_server = foreman-server.$domain_name certname = $host_name environment = production -server = foreman-server.opnfv.com +server = foreman-server.$domain_name runinterval = 600 EOF @@ -105,13 +106,13 @@ EOF # Setup puppet to run on system reboot /sbin/chkconfig --level 345 puppet on -/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag --server foreman-server.opnfv.com --no-daemonize +/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags no_such_tag --server foreman-server.$domain_name --no-daemonize sync # Inform the build system that we are done. echo "Informing Foreman that we are built" -wget -q -O /dev/null --no-check-certificate http://foreman-server.opnfv.com:80/unattended/built +wget -q -O /dev/null --no-check-certificate http://foreman-server.$domain_name:80/unattended/built echo "Starting puppet" systemctl start puppet |