feat: dummy ssl certs task to ansible

This commit is contained in:
Lenoctambule
2026-04-02 13:56:13 +02:00
parent f8a48ee181
commit 66f115a2e2
4 changed files with 31 additions and 53 deletions

View File

@@ -13,6 +13,35 @@
group: root
mode: '0644'
- name: Install dummy SSL certificates
block:
- name: Create cert dir
ansible.builtin.file:
path: "{{ cert_path }}"
state: directory
mode: '0755'
- name: Create private key
community.crypto.openssl_privatekey:
path: "{{ cert_path }}/privkey.pem"
size: 4096
- name: Create signing certificate
community.crypto.openssl_csr:
path: "{{ cert_path }}/cert.csr"
privatekey_path: "{{ cert_path }}/privkey.pem"
- name: Create self-signed certificate
community.crypto.x509_certificate:
path: "{{ cert_path }}/fullchain.pem"
privatekey_path: "{{ cert_path }}/privkey.pem"
csr_path: "{{ cert_path }}/cert.csr"
provider: selfsigned
selfsigned_not_after: "+1d"
state: present
when: not ansible_check_mode
- name: Run the app
ansible.builtin.command: "make -C {{ dest_dir }}"
when: not ansible_check_mode