I want to do the following using ansible:
letsencrypt certonly --agree-tos --standalone \
--cert-name <certname from certificates> \
-d <domain> \
-d <www.domain> \
-d <new.domain>
Is this the best way to do it or is there a better way?
- block:
- name: Create SSL certificate
command: >
letsencrypt certonly
--agree-tos
--standalone
--cert-name {{ ansible_hostname }}
-d {{ _server-name }}
register: letsencrypt_output
changed_when: not "no action taken" in letsencrypt_output.stdout