Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.package
Compare Revisions
master...tomo_re6stnet_install
Source
tomo_re6stnet_install
Select Git revision
...
Target
master
Select Git revision
Compare
Commits (2)
re6stnet-install: don't put token in the title of the certificate
· 326de975
Thomas Gambier
authored
Nov 06, 2019
326de975
Give a title to re6st certificate when installing through re6st playbook
· bbc00849
Thomas Gambier
authored
Nov 07, 2019
bbc00849
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
re6stnet.yml
playbook/re6stnet.yml
+5
-1
main.yml
playbook/roles/re6stnet-install/tasks/main.yml
+25
-13
vifib-re6stnet.yml
playbook/vifib-re6stnet.yml
+1
-1
No files found.
playbook/re6stnet.yml
View file @
bbc00849
...
...
@@ -4,7 +4,6 @@
vars
:
-
re6st_annon
:
False
-
computer_name
:
noname
-
re6st_fingerprint
:
nofingerprint
vars_prompt
:
...
...
@@ -13,6 +12,11 @@
private
:
no
default
:
"
http://re6stnet.nexedi.com/"
-
name
:
"
computer_name"
prompt
:
"
Please
give
a
title
to
your
re6st
certificate
(e.g.
your
computer
name):"
private
:
no
default
:
"
noname"
-
name
:
"
re6sttoken"
prompt
:
"
Please
insert
your
re6stnet
token:"
private
:
no
...
...
playbook/roles/re6stnet-install/tasks/main.yml
View file @
bbc00849
...
...
@@ -5,25 +5,37 @@
-
include
:
sysctl.yml
-
name
:
Configure Re6st with re6st-conf
-
name
:
Configure Re6st with re6st-conf
(with computer_name, fingerprint, no token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-r
title
{{
computer_name
}}
--fingerprint
{{
re6st_fingerprint
}}
-d
/etc/re6stnet
--anonymous"
when
:
re6st_annon ==
True and re6stnet_conf.stat.exists == False
and "{{ computer_name }}" != "noname"
when
:
re6st_annon ==
False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" == "notoken" and "{{ re6st_fingerprint }}" != "nofingerprint"
and "{{ computer_name }}" != "noname"
-
name
:
Update Facts
set_fact
:
computer_name
:
"
{{
re6sttoken
}}"
when
:
computer_name == "noname"
-
name
:
Configure Re6st with re6st-conf (with computer_name, fingerprint, token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-r
title
{{
computer_name
}}
--fingerprint
{{
re6st_fingerprint
}}
-d
/etc/re6stnet
--token
{{
re6sttoken
}}"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" != "nofingerprint" and "{{ computer_name }}" != "noname"
-
debug
:
msg="{{ computer_name }}"
-
name
:
Configure Re6st with re6st-conf (with computer_name, no fingerprint, no token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-r
title
{{
computer_name
}}
-d
/etc/re6stnet
--anonymous"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" == "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint" and "{{ computer_name }}" != "noname"
-
name
:
Configure Re6st with re6st-conf (with computer_name, no fingerprint, token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-r
title
{{
computer_name
}}
-d
/etc/re6stnet
--token
{{
re6sttoken
}}"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint" and "{{ computer_name }}" != "noname"
-
name
:
Configure Re6st with re6st-conf
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--
token
{{
re6sttoken
}}
-r
title
{{
computer_name
}}
--fingerprint
{{
re6st_fingerprint
}}
-d
/etc/re6stnet
"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}"
!= "notoken" and "{{ re6st_fingerprint }}" != "nofingerprint
"
-
name
:
Configure Re6st with re6st-conf
(with no computer_name, fingerprint, no token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--
fingerprint
{{
re6st_fingerprint
}}
-d
/etc/re6stnet
--anonymous
"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}"
== "notoken" and "{{ re6st_fingerprint }}" != "nofingerprint" and "{{ computer_name }}" == "noname
"
-
name
:
Configure Re6st with re6st-conf
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--token
{{
re6sttoken
}}
-r
title
{{
re6sttoken
}}
-d
/etc/re6stnet"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint"
-
name
:
Configure Re6st with re6st-conf (with no computer_name, fingerprint, token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
--fingerprint
{{
re6st_fingerprint
}}
-d
/etc/re6stnet
--token
{{
re6sttoken
}}"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" != "nofingerprint" and "{{ computer_name }}" == "noname"
-
name
:
Configure Re6st with re6st-conf (with no computer_name, no fingerprint, no token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-d
/etc/re6stnet
--anonymous"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" == "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint" and "{{ computer_name }}" == "noname"
-
name
:
Configure Re6st with re6st-conf (with no computer_name, no fingerprint, token)
shell
:
"
re6st-conf
--registry
{{
re6st_registry_url
}}
-d
/etc/re6stnet
--token
{{
re6sttoken
}}"
when
:
re6st_annon == False and re6stnet_conf.stat.exists == False and "{{ re6sttoken }}" != "notoken" and "{{ re6st_fingerprint }}" == "nofingerprint" and "{{ computer_name }}" == "noname"
-
name
:
Recheck if configuration already exists (after running re6st-conf)
stat
:
path=/etc/re6stnet/re6stnet.conf
...
...
playbook/vifib-re6stnet.yml
View file @
bbc00849
...
...
@@ -10,7 +10,7 @@
vars_prompt
:
-
name
:
"
computer_name"
prompt
:
"
Please
insert
your
email
or
a
name
of
this
computer,
it
will
be
used
to
configure
re6st
:"
prompt
:
"
Please
give
a
title
to
your
re6st
certificate
(e.g.
your
computer
name)
:"
private
:
no
default
:
"
noname"
...
...