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
5df12f7d
Commit
5df12f7d
authored
Dec 02, 2022
by
Ophélie Gagnard
Committed by
Ophélie Gagnard
Dec 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ridge: Use slapos cert and key instead of Wendelin password.
parent
64417d15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
playbook/roles/ridge/tasks/main.yml
playbook/roles/ridge/tasks/main.yml
+7
-0
playbook/roles/ridge/vars/main.yml
playbook/roles/ridge/vars/main.yml
+8
-3
No files found.
playbook/roles/ridge/tasks/main.yml
View file @
5df12f7d
-
name
:
Install packages to scan
-
name
:
Install packages to scan
shell
:
apt -y install {{ packages_to_scan }} ||
true
shell
:
apt -y install {{ packages_to_scan }} ||
true
-
name
:
Create key and cert directory
shell
:
mkdir -p {{ key_and_cert_dir }}
-
name
:
Create key and cert files
# echo -e because the string contains "\n" characters
shell
:
'
echo
"{{
slapos_key
}}"
>
{{
key_and_cert_dir
}}/key;
echo
"{{
slapos_cert
}}"
>
{{
key_and_cert_dir
}}/certificate'
-
name
:
Create configuration from template
-
name
:
Create configuration from template
shell
:
"
sed
'{{conf_regex}}'
{{conf}}.in
>
{{conf}}"
shell
:
"
sed
'{{conf_regex}}'
{{conf}}.in
>
{{conf}}"
...
...
playbook/roles/ridge/vars/main.yml
View file @
5df12f7d
...
@@ -6,10 +6,15 @@ mca_path: /opt/{{mca_name}}
...
@@ -6,10 +6,15 @@ mca_path: /opt/{{mca_name}}
flb_path
:
/opt/{{fluentbit_name}}
flb_path
:
/opt/{{fluentbit_name}}
plugin_path
:
/opt/{{plugin_name}}
plugin_path
:
/opt/{{plugin_name}}
## KEY AND CERT
slapos_key
:
"
{{
lookup('env',
'ANSIBLE_slapos_key')
}}"
slapos_cert
:
"
{{
lookup('env',
'ANSIBLE_slapos_cert')
}}"
## WENDELIN CONFIGURATION
## WENDELIN CONFIGURATION
key_and_cert_dir
:
/etc/opt/slapos/ssl
slapos_key_file
:
"
{{
key_and_cert_dir
}}/key"
slapos_cert_file
:
"
{{
key_and_cert_dir
}}/certificate"
wendelin_url
:
"
{{
lookup('env',
'ANSIBLE_wendelin_url')
}}"
wendelin_url
:
"
{{
lookup('env',
'ANSIBLE_wendelin_url')
}}"
wendelin_user
:
"
{{
lookup('env',
'ANSIBLE_wendelin_user')
}}"
wendelin_pwd
:
"
{{
lookup('env',
'ANSIBLE_wendelin_pwd')
}}"
wendelin_reference
:
"
{{
lookup('env',
'ANSIBLE_wendelin_reference')
}}"
wendelin_reference
:
"
{{
lookup('env',
'ANSIBLE_wendelin_reference')
}}"
packages_to_scan
:
"
{{
lookup('env',
'ANSIBLE_packages_to_scan')
}}"
packages_to_scan
:
"
{{
lookup('env',
'ANSIBLE_packages_to_scan')
}}"
...
@@ -20,4 +25,4 @@ plugin: "{{plugin_path}}/lib/libfluentbit_wendelin.so"
...
@@ -20,4 +25,4 @@ plugin: "{{plugin_path}}/lib/libfluentbit_wendelin.so"
conf
:
"
{{plugin_path}}/etc/flb.conf"
conf
:
"
{{plugin_path}}/etc/flb.conf"
log
:
/var/log/metadata_collect.log
log
:
/var/log/metadata_collect.log
conf_regex
:
s|%
WENDELIN_URL%|{{wendelin_url}}|g;s|%WENDELIN_USER%|{{wendelin_user}}|g;s|%WENDELIN_PWD%|{{wendelin_pwd
}}|g;s|%WENDELIN_REFERENCE%|{{wendelin_reference}}|g;s|%SCAN_FILE%|{{log}}|g
conf_regex
:
s|%
SLAPOS_KEY_FILE%|{{slapos_key_file}}|g;s|%SLAPOS_CERT_FILE%|{{slapos_cert_file}}|g;s|%WENDELIN_URL%|{{wendelin_url
}}|g;s|%WENDELIN_REFERENCE%|{{wendelin_reference}}|g;s|%SCAN_FILE%|{{log}}|g
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