Skip to content
Snippets Groups Projects
Commit 6237cb90 authored by ale's avatar ale
Browse files

Use a variable for the public domain name

parent b9ab45fe
No related branches found
No related tags found
No related merge requests found
API_VERSION = "2" API_VERSION = "2"
# Need to match the values set in group_vars/all.
DOMAIN = "minicluster-test.net" DOMAIN = "minicluster-test.net"
DOMAIN_PUBLIC = "public.minicluster-test.net"
Vagrant.configure(API_VERSION) do |config| Vagrant.configure(API_VERSION) do |config|
...@@ -21,14 +23,15 @@ Vagrant.configure(API_VERSION) do |config| ...@@ -21,14 +23,15 @@ Vagrant.configure(API_VERSION) do |config|
# Hosts need to find each other using both the short name and the # Hosts need to find each other using both the short name and the
# fqdn. Furthermore, the OAuth workflow (even internally) uses the # fqdn. Furthermore, the OAuth workflow (even internally) uses the
# public domain, so we also create an entry for that, pointing at a # public domain, so we also create an entry for that, pointing at a
# random node. # random node (we assume that the public domain doesn't actually
# exist).
config.vm.provision "shell", inline: <<SCRIPT config.vm.provision "shell", inline: <<SCRIPT
cat > /etc/hosts <<EOF cat > /etc/hosts <<EOF
127.0.0.1 localhost 127.0.0.1 localhost
192.168.10.10 node1.#{DOMAIN} node1 192.168.10.10 node1.#{DOMAIN} node1
192.168.10.11 node2.#{DOMAIN} node2 192.168.10.11 node2.#{DOMAIN} node2
192.168.10.12 node3.#{DOMAIN} node3 192.168.10.12 node3.#{DOMAIN} node3
192.168.10.12 hydra.public.#{DOMAIN} 192.168.10.12 hydra.#{DOMAIN_PUBLIC}
EOF EOF
SCRIPT SCRIPT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment