Add Vagrant cache option for dhparams.pem

This commit is contained in:
Kris Lamoureux 2024-03-26 21:51:39 -04:00
parent 01e8e22c01
commit 6fbd3c53bb
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
cached_dhparams_pem: /vagrant/scratch/dhparams.pem

View File

@ -10,6 +10,19 @@
state: started
enabled: true
- name: Check for cached dhparams.pem file
ansible.builtin.stat:
path: "{{ cached_dhparams_pem }}"
register: dhparams_file
- name: Copy cached dhparams.pem to /etc/ssl/
ansible.builtin.copy:
src: "{{ cached_dhparams_pem }}"
dest: /etc/ssl/dhparams.pem
mode: "600"
remote_src: true
when: dhparams_file.stat.exists
- name: Generate DH Parameters
community.crypto.openssl_dhparam:
path: /etc/ssl/dhparams.pem