Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-graylog-sidecar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
hdacloud
ansible-graylog-sidecar
Commits
2c5558d5
Commit
2c5558d5
authored
2 years ago
by
Alexander Käb
Browse files
Options
Downloads
Patches
Plain Diff
fix(certs): Fix ca cert naming in tasks and fix upload file permissions
parent
5bda8015
Branches
Branches containing commit
No related tags found
1 merge request
!1
feat(node-certs): Add tasks to generate node certificates
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-0
3 additions, 0 deletions
README.md
tasks/node-certs.yml
+12
-12
12 additions, 12 deletions
tasks/node-certs.yml
with
15 additions
and
12 deletions
README.md
+
3
−
0
View file @
2c5558d5
...
...
@@ -61,4 +61,7 @@ sidecar_cert_dir: "/etc/graylog/sidecar"
# The time in days the client certificates will be valid
cert_valid_days
:
1095
# The passphrase used for the CA file
sidecar_ca_passphrase
:
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tasks/node-certs.yml
+
12
−
12
View file @
2c5558d5
---
-
name
:
Fail if 'sidecar-ca' host group is missing
# noqa: run_once[task]
ansible.builtin.fail
:
msg
:
"
Please
add
a
host
group
'sidecar-ca'
with
the
host
storing
the
CA
file
first"
msg
:
"
Please
add
a
host
group
'sidecar-ca'
with
the
host
(s)
storing
the
CA
file
first"
run_once
:
true
when
:
"
not
(
{{
groups['sidecar-ca']
is
defined
}}
)"
when
:
"
not
(groups['sidecar-ca']
is
defined)"
-
name
:
Node Certificates | Create temporary directopry for certificates
# noqa: run_once[task]
ansible.builtin.file
:
...
...
@@ -19,8 +19,8 @@
dest
:
"
{{
tmp_cert_dir
}}/"
flat
:
true
with_items
:
-
"
{{
gl_sidecar_ca_path
}}/
gl-
sidecar.pem"
-
"
{{
gl_sidecar_ca_path
}}/
gl-
sidecar.key"
-
"
{{
gl_sidecar_ca_path
}}/sidecar
-ca
.pem"
-
"
{{
gl_sidecar_ca_path
}}/sidecar
-ca
.key"
delegate_to
:
"
{{
groups['sidecar-ca']
|
first
}}"
become
:
true
run_once
:
true
...
...
@@ -50,9 +50,9 @@
path
:
"
{{
tmp_cert_dir
}}/sidecar-{{
inventory_hostname
}}.pem"
csr_content
:
"
{{
node_csr.csr
}}"
provider
:
ownca
ownca_path
:
"
{{
tmp_cert_dir
}}/
gl-
sidecar.pem"
ownca_privatekey_path
:
"
{{
tmp_cert_dir
}}/
gl-
sidecar.key"
ownca_privatekey_passphrase
:
"
{{
ca_passphrase
}}"
ownca_path
:
"
{{
tmp_cert_dir
}}/sidecar
-ca
.pem"
ownca_privatekey_path
:
"
{{
tmp_cert_dir
}}/sidecar
-ca
.key"
ownca_privatekey_passphrase
:
"
{{
sidecar_
ca_passphrase
}}"
ownca_not_after
:
"
+{{
cert_valid_days
}}d"
ownca_not_before
:
"
-1d"
# valid since yesterday
...
...
@@ -61,10 +61,10 @@
block
:
-
name
:
Node Certificates | Copy Node certificates
ansible.builtin.copy
:
src
:
"
{{
tmp_cert_dir
}}/{{
item
}}"
src
:
"
{{
tmp_cert_dir
}}/{{
item
.file
}}"
dest
:
"
{{
sidecar_cert_dir
}}"
mode
:
0600
mode
:
"
{{
item.mode
}}"
with_items
:
-
"
sidecar-{{
inventory_hostname
}}.key"
-
"
sidecar-{{
inventory_hostname
}}.pem"
-
"
gl-sidecar.pem"
\ No newline at end of file
-
{
file
:
"
sidecar-{{
inventory_hostname
}}.key"
,
mode
:
"
0600"
}
-
{
file
:
"
sidecar-{{
inventory_hostname
}}.pem"
,
mode
:
"
0644"
}
-
{
file
:
"
sidecar-ca.pem"
,
mode
:
"
0644"
}
\ No newline at end of file
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