๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ansible-playbooks/roles/ca/tasks/check_acme.yml

18 lines
721 B

- block:
- name: check if acme main account exists
community.crypto.acme_account_info:
account_key_src: "{{ ca_dir ~ '/acme-main.' ~ ca_key_ext }}"
account_key_passphrase: "{{ ca_acme_account_key_password }}"
acme_directory: "{{ ca_acme_endpoint | d('https://acme-v02.api.letsencrypt.org/directory') }}"
acme_version: "{{ ca_acme_version | d(2) }}"
register: acme_info
delegate_to: "{{ services.ca.hostname }}"
- name: determine acme support
set_fact:
has_acme: "{{ acme_info is defined and acme_info.exists and acme_info.account.status == 'valid' and (acme_disable | d(false) == false) }}"
rescue:
- name: revert has_acme
set_fact:
has_acme: false