From 8b2d95c6bfc7e6ec79bdb2f7bcb84a20d7d8d5c8 Mon Sep 17 00:00:00 2001 From: Daniel Lawton Date: Mon, 16 Nov 2026 17:00:45 +0000 Subject: [PATCH] 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 --- playbooks/regen-standalone-certs.yaml | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 playbooks/regen-standalone-certs.yaml diff --git a/playbooks/regen-standalone-certs.yaml b/playbooks/regen-standalone-certs.yaml new file mode 100644 index 0000000..624bc7b --- /dev/null +++ b/playbooks/regen-standalone-certs.yaml @@ -0,0 +1,32 @@ +--- +# Regenerate only the simpleca CA + standalone server certificate on localhost. +# This mirrors the SSL generation block in install_stack.yaml without deploying +# TripleO or touching the remote host. +- name: Regenerate simpleca and standalone certs on localhost + hosts: localhost + connection: local + gather_facts: false + vars_files: vars/defaults.yaml + tasks: + - name: Create temporary directory for SSL files + ansible.builtin.tempfile: + state: directory + suffix: dev-install-ssl + register: ssl_dir + + - name: Generate standalone SSL certificates + ansible.builtin.include_role: + name: simpleca + vars: + cert_user: standalone + cert_name: standalone + ca_dir: "{{ ssl_dir.path }}/ssl/ca" + cert_dir: "{{ ssl_dir.path }}/ssl" + + - name: Show where certs were written + ansible.builtin.debug: + msg: + - "CA cert: {{ ssl_dir.path }}/ssl/ca/simpleca.crt" + - "CA key: {{ ssl_dir.path }}/ssl/ca/simpleca.key" + - "Server cert: {{ ssl_dir.path }}/ssl/standalone.crt" + - "Server key: {{ ssl_dir.path }}/ssl/standalone.key"