Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-minicluster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
ansible-minicluster
Commits
6237cb90
Commit
6237cb90
authored
7 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Use a variable for the public domain name
parent
b9ab45fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/Vagrantfile
+5
-2
5 additions, 2 deletions
test/Vagrantfile
with
5 additions
and
2 deletions
test/Vagrantfile
+
5
−
2
View file @
6237cb90
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment