From e56713301b19c67480d84b55dd513575b50cfd42 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 20 Sep 2022 18:11:00 +0200 Subject: ACME for signed_certificate --- .../signed_certificate/playbook_create_account.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 roles/signed_certificate/playbook_create_account.yml (limited to 'roles/signed_certificate/playbook_create_account.yml') diff --git a/roles/signed_certificate/playbook_create_account.yml b/roles/signed_certificate/playbook_create_account.yml new file mode 100644 index 0000000..ac6c474 --- /dev/null +++ b/roles/signed_certificate/playbook_create_account.yml @@ -0,0 +1,28 @@ +--- +- name: Create ACME Account + hosts: localhost + vars: + directory: 'https://acme-staging-v02.api.letsencrypt.org/directory' + contact: + - 'mailto:mail@assdfkjsdhf.com' + tasks: + - name: Create private key + community.crypto.openssl_privatekey: + path: acme_account.key + return_content: True + size: 2048 + register: privkey + + - name: Create ACME Account + community.crypto.acme_account: + acme_directory: '{{ directory }}' + acme_version: 2 + account_key_content: '{{ privkey.privatekey }}' + contact: '{{ contact }}' + state: present + terms_agreed: True + register: account + + - name: Print account + debug: + var: account -- cgit v1.2.3