Convert the mkcert command into a shell one.

This commit is contained in:
Andrea Dell'Amico 2023-07-13 11:37:57 +02:00
parent 436acc9bab
commit 8593cee53f
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 2 additions and 6 deletions

View File

@ -7,12 +7,8 @@
ansible_common_remote_group: ansible
- name: Create the certificate (delegate to the CA vm)
become: true
become_user: mkcert-ca
become_method: su
become_flags: '-s /bin/bash'
ansible.builtin.command:
cmd: mkcert -cert-file {{ mkcert_cert_name }} -key-file {{ mkcert_key_name }} {{ mkcert_dsn_and_ip_list }}
ansible.builtin.shell:
cmd: su - mkcert-ca -s /bin/bash mkcert -cert-file {{ mkcert_cert_name }} -key-file {{ mkcert_key_name }} {{ mkcert_dsn_and_ip_list }}
args:
chdir: /srv/mkcert-ca
creates: "/srv/mkcert-ca/{{ mkcert_cert_name }}"