Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
68
Issue boards
Milestones
Wiki
Code
Merge requests
10
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
hpc-factory
Commits
dcd97881
Commit
dcd97881
authored
5 months ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
feat: add ssl_cert role
parent
8a799a3e
No related branches found
Branches containing commit
No related tags found
2 merge requests
!147
Fix http proxy cert
,
!117
This MR merges the feat-hpc-factory branch, which was focused on building and deploying proxy images for the COD cluster.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/cluster.yml
+1
-0
1 addition, 0 deletions
ansible/cluster.yml
ansible/roles/ssl_cert/tasks/main.yaml
+46
-0
46 additions, 0 deletions
ansible/roles/ssl_cert/tasks/main.yaml
with
47 additions
and
0 deletions
ansible/cluster.yml
+
1
−
0
View file @
dcd97881
...
@@ -9,4 +9,5 @@
...
@@ -9,4 +9,5 @@
-
{
name
:
'
slurm_client'
,
tags
:
'
slurm_client'
,
when
:
enable_slurm_client
}
-
{
name
:
'
slurm_client'
,
tags
:
'
slurm_client'
,
when
:
enable_slurm_client
}
-
{
name
:
'
ssh_host_keys'
,
tags
:
'
ssh_host_keys'
}
-
{
name
:
'
ssh_host_keys'
,
tags
:
'
ssh_host_keys'
}
-
{
name
:
'
ssh_proxy_config'
,
tags
:
'
ssh_proxy_config'
,
when
:
enable_ssh_proxy_config
}
-
{
name
:
'
ssh_proxy_config'
,
tags
:
'
ssh_proxy_config'
,
when
:
enable_ssh_proxy_config
}
-
{
name
:
'
ssl_cert'
,
tags
:
'
ssl_cert'
}
-
{
name
:
'
rsyslog_config'
,
tags
:
'
rsyslog_config'
,
when
:
enable_rsyslog_config
}
-
{
name
:
'
rsyslog_config'
,
tags
:
'
rsyslog_config'
,
when
:
enable_rsyslog_config
}
This diff is collapsed.
Click to expand it.
ansible/roles/ssl_cert/tasks/main.yaml
0 → 100644
+
46
−
0
View file @
dcd97881
---
-
name
:
Download SSL Certs from S3
aws_s3
:
mode
:
get
s3_url
:
"
{{
S3_ENDPOINT
}}"
bucket
:
"
{{
ssl_cert_s3_bucket
}}"
object
:
"
{{
item
}}"
dest
:
"
{{
ssl_cert_file_location
}}/{{
item
}}"
aws_access_key
:
"
{{
LTS_ACCESS_KEY
}}"
aws_secret_key
:
"
{{
LTS_SECRET_KEY
}}"
vars
:
ansible_python_interpreter
:
/usr/bin/python3
when
:
ssl_cert_s3_bucket | length > 0 and item | length >
0
loop
:
-
"
{{
ssl_cert_file
}}"
-
"
{{
ssl_cert_chain_file
}}"
-
name
:
Download SSL key from S3
aws_s3
:
mode
:
get
s3_url
:
"
{{
S3_ENDPOINT
}}"
bucket
:
"
{{
ssl_cert_s3_bucket
}}"
object
:
"
{{
ssl_cert_key
}}"
dest
:
"
{{
ssl_cert_key_location
}}/{{
ssl_cert_key
}}"
aws_access_key
:
"
{{
LTS_ACCESS_KEY
}}"
aws_secret_key
:
"
{{
LTS_SECRET_KEY
}}"
vars
:
ansible_python_interpreter
:
/usr/bin/python3
when
:
ssl_cert_s3_bucket | length > 0 and ssl_cert_key | length >
0
-
name
:
Update SSL in Apache config
ansible.builtin.replace
:
path
:
"
{{
ssl_apache_config
}}"
regexp
:
"
{{
item.regexp
}}"
replace
:
"
\\
1
{{
item.location
}}/{{
item.value
}}"
backup
:
true
when
:
ssl_apache_config | length > 0 and item.value | length >
0
loop
:
-
{
regexp
:
"
#?(SSLCertificateFile).*$"
,
location
:
"
{{
ssl_cert_file_location
}}"
,
value
:
"
{{
ssl_cert_file
}}"
}
-
{
regexp
:
"
#?(SSLCertificateChainFile).*$"
,
location
:
"
{{
ssl_cert_file_location
}}"
,
value
:
"
{{
ssl_cert_chain_file
}}"
}
-
{
regexp
:
"
#?(SSLCertificateKeyFile).*$"
,
location
:
"
{{
ssl_cert_key_location
}}"
,
value
:
"
{{
ssl_cert_key
}}"
}
-
name
:
Restart apache service
ansible.builtin.service
:
name
:
"
{{
apache_service
}}"
state
:
restarted
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