Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kubernetes-vagrant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benguria Elguezabal, Gorka
kubernetes-vagrant
Commits
4d4528fe
Commit
4d4528fe
authored
May 23, 2021
by
Benguria Elguezabal, Gorka
Browse files
Options
Downloads
Patches
Plain Diff
adds host to the etc/hosts
parent
b7130ea6
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Vagrantfile
+1
-1
1 addition, 1 deletion
Vagrantfile
ansible/addHostsToEtcHosts.sh
+0
-1
0 additions, 1 deletion
ansible/addHostsToEtcHosts.sh
ansible/hosts-from-inventory/site.yaml
+0
-13
0 additions, 13 deletions
ansible/hosts-from-inventory/site.yaml
ansible/install.sh
+0
-13
0 additions, 13 deletions
ansible/install.sh
with
1 addition
and
28 deletions
Vagrantfile
+
1
−
1
View file @
4d4528fe
...
...
@@ -188,7 +188,7 @@ Vagrant.configure("2") do |config|
subconfig
.
vm
.
provision
"shell"
,
name:
"Install ansible"
,
path:
File
.
expand_path
(
'../scripts/ansible/install.sh'
,
__FILE__
),
run:
'once'
subconfig
.
vm
.
provision
"shell"
,
name:
"a
nsible
"
,
inline:
"/bin/sh /kubernetes-vagrant/ansible/
install.sh"
,
run:
'never'
subconfig
.
vm
.
provision
"shell"
,
name:
"a
ddHostsToEtcHosts
"
,
inline:
"/bin/sh /kubernetes-vagrant/ansible/
addHostsToEtcHosts.sh"
,
run:
'never'
,
privileged:
false
end
vms
.
nodes
.
each
do
|
node_hash
|
...
...
This diff is collapsed.
Click to expand it.
ansible/
kubernetes/install
.sh
→
ansible/
addHostsToEtcHosts
.sh
+
0
−
1
View file @
4d4528fe
...
...
@@ -9,5 +9,4 @@ SCRIPT_DIR=$(dirname "$0")
cd
$SCRIPT_DIR
export
ANSIBLE_CONFIG
=
$SCRIPT_DIR
/ansible.cfg
ansible-playbook
$SCRIPT_DIR
/hosts-from-inventory/site.yaml
This diff is collapsed.
Click to expand it.
ansible/hosts-from-inventory/site.yaml
+
0
−
13
View file @
4d4528fe
-
hosts
:
all
pre_tasks
:
-
name
:
Print all available facts
debug
:
var
:
groups['all']
-
name
:
Print management facts
debug
:
var
:
hostvars['management']['ip']
-
name
:
Check inventory
debug
:
msg
:
"
{{
hostvars[item]['ip']
}}
{{item}}"
when
:
hostvars[item]['ip'] is defined
with_items
:
-
"
{{
groups['all']
}}"
tasks
:
-
name
:
Add the inventory into /etc/hosts
become
:
yes
...
...
This diff is collapsed.
Click to expand it.
ansible/install.sh
deleted
100755 → 0
+
0
−
13
View file @
b7130ea6
#!/bin/bash
set
-e
# check if docker-compose is available if it is installed exist
hash
docker-compose
>
/dev/null 2>&1
&&
exit
0
||
true
echo
Provisioning ansible...
SCRIPT_DIR
=
$(
dirname
"
$0
"
)
cd
$SCRIPT_DIR
export
ANSIBLE_CONFIG
=
$SCRIPT_DIR
/ansible.cfg
# ansible-playbook -u $user site.yaml
ansible-playbook site.yaml
--extra-vars
"
$1
"
\ No newline at end of file
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