Skip to content

Commit 8b2d95c

Browse files
committed
Added a playbook that generates new CA credentials, it mirrors the SSL generation block in install_stack.yaml without needing to deploy TripleO or touch the remote host
Signed-off-by: Daniel Lawton <dlawton@redhat.com>
1 parent fd34fab commit 8b2d95c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# Regenerate only the simpleca CA + standalone server certificate on localhost.
3+
# This mirrors the SSL generation block in install_stack.yaml without deploying
4+
# TripleO or touching the remote host.
5+
- name: Regenerate simpleca and standalone certs on localhost
6+
hosts: localhost
7+
connection: local
8+
gather_facts: false
9+
vars_files: vars/defaults.yaml
10+
tasks:
11+
- name: Create temporary directory for SSL files
12+
ansible.builtin.tempfile:
13+
state: directory
14+
suffix: dev-install-ssl
15+
register: ssl_dir
16+
17+
- name: Generate standalone SSL certificates
18+
ansible.builtin.include_role:
19+
name: simpleca
20+
vars:
21+
cert_user: standalone
22+
cert_name: standalone
23+
ca_dir: "{{ ssl_dir.path }}/ssl/ca"
24+
cert_dir: "{{ ssl_dir.path }}/ssl"
25+
26+
- name: Show where certs were written
27+
ansible.builtin.debug:
28+
msg:
29+
- "CA cert: {{ ssl_dir.path }}/ssl/ca/simpleca.crt"
30+
- "CA key: {{ ssl_dir.path }}/ssl/ca/simpleca.key"
31+
- "Server cert: {{ ssl_dir.path }}/ssl/standalone.crt"
32+
- "Server key: {{ ssl_dir.path }}/ssl/standalone.key"

0 commit comments

Comments
 (0)