Files
tildes/ansible/roles/self_signed_ssl_cert/tasks/main.yml
T
2025-03-10 22:49:00 -06:00

23 lines
559 B
YAML

---
- name: Install packages needed by Ansible community plugins
pip:
executable: pip3
break_system_packages: true
name: cryptography
- name: Create directory for certificate
file:
path: "{{ ssl_cert_dir }}"
state: directory
mode: 0755
- name: Create a private key
community.crypto.openssl_privatekey:
path: "{{ ssl_private_key_path }}"
- name: Create a self-signed certificate
community.crypto.x509_certificate:
path: "{{ ssl_cert_path }}"
privatekey_path: "{{ ssl_private_key_path }}"
provider: selfsigned