feat: dummy ssl certs task to ansible
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user