Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rafael Monnerat
slapos.package
Commits
48570668
Commit
48570668
authored
Dec 28, 2020
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Plain Diff
Fix warning and conditionalize questions when install SlapOS node
See merge request
nexedi/slapos.package!136
parents
7d818359
e00c818f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
playbook/roles/slapos/tasks/main.yml
playbook/roles/slapos/tasks/main.yml
+1
-1
playbook/slapos.yml
playbook/slapos.yml
+15
-8
No files found.
playbook/roles/slapos/tasks/main.yml
View file @
48570668
...
...
@@ -12,7 +12,7 @@
-
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
}}
--interface-name
{{
interface_name
}}
{{
computer_name
}}"
when
:
slapos_cfg.stat.exists == False and
"{{ slapostoken }}" != "notoken" and "{{ computer_name }}"
!= "noname"
when
:
slapos_cfg.stat.exists == False and
slapostoken != "notoken" and computer_name
!= "noname"
-
name
:
Check if configuration exists already
stat
:
path=/etc/opt/slapos/slapos.cfg
...
...
playbook/slapos.yml
View file @
48570668
...
...
@@ -2,9 +2,6 @@
hosts
:
127.0.0.1
connection
:
local
vars
:
-
interface_name
:
lo
vars_prompt
:
-
name
:
"
slapos_master_url"
prompt
:
"
What
is
the
url
to
the
SlapOS
Master
API?
(ignore
if
you
already
have
a
configured
re6st
and
slapos):"
...
...
@@ -17,14 +14,24 @@
default
:
"
https://slapos.vifib.com/"
-
name
:
"
computer_name"
prompt
:
"
What
is
this
computer
name?
(ignore
if
you
already
have
a
configured
re6st
and
slapos
):"
prompt
:
"
Name
your
computer
(ignore
if
you
already
have
a
configured
re6st
and
slapos
or
if
you
don't
want
to
register
your
computer
to
SlapOS
Master
):"
private
:
no
default
:
"
noname"
-
name
:
"
slapostoken"
prompt
:
"
If
you
have
slapos
token
if
you
have
(ignore
if
you
already
have
a
configured
slapos):"
private
:
no
default
:
"
notoken"
pre_tasks
:
-
pause
:
prompt
:
"
Input
your
slapos
token
(ignore
if
you
already
have
a
configured
slapos)
[notoken]"
when
:
computer_name != "noname"
register
:
prompt
-
set_fact
:
slapostoken
:
"
{{
prompt.user_input
|
default('notoken',
true)
}}"
-
pause
:
prompt
:
"
Which
network
interface
are
you
using?
(ignore
if
you
already
have
a
configured
re6st)
[lo]"
when
:
slapostoken != "notoken"
register
:
prompt
-
set_fact
:
interface_name
:
"
{{
prompt.user_input
|
default('lo',
true)
}}"
roles
:
-
{
role
:
slapos
,
package_state
:
present
}
...
...
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