Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.playbook
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
slapos.playbook
Commits
0791285c
Commit
0791285c
authored
Apr 29, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include vm bootstrapping for re6st interface.
parent
6a51d914
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
2 deletions
+58
-2
build_install_folder
build_install_folder
+1
-0
install/imt/vm-bootstrap
install/imt/vm-bootstrap
+23
-0
playbook/imt-vm-bootstrap.yml
playbook/imt-vm-bootstrap.yml
+6
-0
playbook/roles/slapos/meta/main.yml
playbook/roles/slapos/meta/main.yml
+1
-1
playbook/roles/slapos/tasks/slapos.yml
playbook/roles/slapos/tasks/slapos.yml
+9
-1
playbook/roles/vm-bootstrap/tasks/main.yml
playbook/roles/vm-bootstrap/tasks/main.yml
+18
-0
No files found.
build_install_folder
View file @
0791285c
...
...
@@ -20,3 +20,4 @@ render("gnet-server.yml", "install/gnet/slapos")
# imt
render("imt-server-update.yml", "install/imt/slapos-update")
render("imt-server.yml", "install/imt/slapos")
render("imt-vm-bootstrap.yml", "install/imt/vm-bootstrap")
install/imt/vm-bootstrap
0 → 100644
View file @
0791285c
#!/bin/bash
PLAYBOOK_REPOSITORY_URL
=
https://lab.nexedi.cn/rafael/slapos.playbook/repository/archive.tar.gz?ref
=
master
PLAYBOOK_FILE
=
imt-vm-bootstrap.yml
#### Setup Ansible and load few libraries #####
BASE_SETUP_SCRIPT_MD5
=
836e9256decdf8e2cd49d388fa7851ab
wget
--no-check-certificate
https://deploy.nexedi.cn/base-setup
-O
/tmp/base-setup
if
[
"
`
md5sum
/tmp/base-setup |
cut
-f1
-d
\
`
"
!=
"
$BASE_SETUP_SCRIPT_MD5
"
]
;
then
echo
"ERROR: base-setup has wrong md5
`
md5sum
/tmp/base-setup |
cut
-f1
-d
\
`
!=
$BASE_SETUP_SCRIPT_MD5
"
exit
1
fi
source
/tmp/base-setup
download_playbook
$PLAYBOOK_REPOSITORY_URL
echo
"Starting Ansible playbook:"
ansible-playbook
$PLAYBOOK_FILE
-i
hosts
--connection
=
local
\ No newline at end of file
playbook/imt-vm-bootstrap.yml
0 → 100644
View file @
0791285c
-
name
:
a play that runs entirely on the ansible host
hosts
:
127.0.0.1
connection
:
local
roles
:
-
vm-bootstrap
playbook/roles/slapos/meta/main.yml
View file @
0791285c
---
dependencies
:
-
{
role
:
package
,
package_name
:
slapos-node
,
package_state
:
present
}
-
{
role
:
repository
}
playbook/roles/slapos/tasks/slapos.yml
View file @
0791285c
-
name
:
Install packages using apt
apt
:
name=slapos-node state=present update_cache=yes cache_valid_time=3600
when
:
ansible_os_family == "Debian"
-
name
:
Install re6stnet on CentOS
yum
:
name=slapos.node state=present update_cache=yes
when
:
ansible_os_family == "RedHat"
-
name
:
Check if configuration exists already
stat
:
path=/etc/opt/slapos/slapos.cfg
register
:
slapos_cfg
-
name
:
Configure SlapOS with slapos node register
shell
:
"
slapos
node
register
--token
{{
slapostoken
}}
--master-url
{{
slapos_master_url
}}
--master-url-web
{{
slapos_web_master_url
}}
{{
computer_name
}}"
shell
:
"
slapos
node
register
--token
{{
slapostoken
}}
--master-url
{{
slapos_master_url
}}
--master-url-web
{{
slapos_web_master_url
}}
--interface-name
lo
{{
computer_name
}}"
when
:
slapos_cfg.stat.exists == False and "{{ slapostoken }}" != "notoken" and "{{ computer_name }}" != "noname"
-
name
:
Run slapos format for initial bootstrap
...
...
playbook/roles/vm-bootstrap/tasks/main.yml
0 → 100644
View file @
0791285c
-
name
:
Create /etc/opt dir
file
:
dest=/etc/opt mode=775 state=directory
-
name
:
Download configuration
get_url
:
url=http://10.0.2.100/netconfig.sh dest=/etc/opt/netconfig.sh mode=755
-
name
:
stat /etc/opt/netconfig.sh
stat
:
/etc/opt/netconfig.sh
register
:
netconfig_file
-
name
:
replace /etc/rc.local
copy
:
src=/etc/opt/netconfig.sh dest=/etc/rc.local mode=755
when
:
netconfig_file.stat.exists == True
-
name
:
call netconfig.sh
shell
:
/etc/opt/netconfig.sh
when
:
netconfig_file.stat.exists == True
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment