File tree Expand file tree Collapse file tree 6 files changed +27
-12
lines changed
Expand file tree Collapse file tree 6 files changed +27
-12
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,17 @@ If you are running this role in a temporary environment such as a CI runner and
7171| acme_staging_directory | no | acme-staging-v02.api.letsencrypt.org | Acme directory which will be used for certificate challenge
7272| acme_live_directory | no | acme-v02.api.letsencrypt.org | Acme directory which will be used for certificate challenge
7373| acme_account_key_path | no | $acme_conf_dir | Path for account key
74+ | acme_account_key_size | no | 4096 | Account key size
75+ | acme_account_key_type | no | ECC | Account key type
76+ | acme_account_key_curve | no | secp384r1 | Account key curve used
7477| acme_csr_path | no | $acme_conf_dir/certs | Path for csr which is created for challenge
7578| acme_cert_path | no | $acme_conf_dir/certs | Path for issued certificate
7679| acme_intermediate_path | no | $acme_conf_dir/certs | Path for intermediate chain
7780| acme_fullchain_path | no | $acme_conf_dir/certs | Path for full chain file (certificate + intermediate)
7881| acme_private_key_path | no | $acme_conf_dir/certs | Path for private key
82+ | acme_private_key_size | no | 4096 | Private key size
83+ | acme_private_key_type | no | ECC | Private key type
84+ | acme_private_key_curve | no | secp384r1 | Private key curve used
7985| acme_remaining_days | no | 30 | Min days remaining before certificate will be renewed
8086| acme_convert_cert_to | no | | Format to convert the certificate to: ` pfx `
8187| acme_validate_certs | no | | Only used in integration tests with pebble server
Original file line number Diff line number Diff line change @@ -9,12 +9,18 @@ acme_staging_directory: https://acme-staging-v02.api.letsencrypt.org/directory
99acme_live_directory : https://acme-v02.api.letsencrypt.org/directory
1010acme_use_live_directory : false
1111acme_account_key_path : " {{ acme_conf_dir }}/letsencrypt_account.pem"
12+ acme_account_key_size : " 4096"
13+ acme_account_key_type : " ECC"
14+ acme_account_key_curve : " secp384r1"
1215acme_csr_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}.csr"
1316acme_cert_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}.pem"
1417acme_pfx_cert_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}.pfx"
1518acme_intermediate_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}_intermediate.pem"
1619acme_fullchain_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}_fullchain.pem"
1720acme_private_key_path : " {{ acme_cert_dir }}/{{ acme_domain.certificate_name }}.key"
21+ acme_private_key_size : " 4096"
22+ acme_private_key_type : " ECC"
23+ acme_private_key_curve : " secp384r1"
1824acme_remaining_days : " 30"
1925
2026# ## provider specific config
Original file line number Diff line number Diff line change 99 method : POST
1010 body_format : json
1111 body : { context: "4", user: "{{ acme_dns_user }}", password: "{{ acme_dns_password }}" }
12- register : login
12+ register : acme_login
1313
1414 - name : Add a new TXT record to the SAN domains
1515 ansible.builtin.uri :
3333 ]
3434 }
3535 headers :
36- Cookie : " {{ login .set_cookie }}"
36+ Cookie : " {{ acme_login .set_cookie }}"
3737 loop : " {{ acme_domain.subject_alt_name }}"
3838 when :
3939 - acme_domain.subject_alt_name is defined
7575 ]
7676 }
7777 headers :
78- Cookie : " {{ login .set_cookie }}"
78+ Cookie : " {{ acme_login .set_cookie }}"
7979 loop : " {{ acme_domain.subject_alt_name }}"
8080 when :
8181 - acme_domain.subject_alt_name is defined
Original file line number Diff line number Diff line change 88 url : https://dns.hetzner.com/api/v1/zones?name={{ acme_domain.zone }}
99 headers :
1010 Auth-API-Token : " {{ acme_hetzner_auth_token }}"
11- register : lookup_zone_id
11+ register : acme_lookup_zone_id
1212
1313 - name : Add a new TXT record to the SAN domains
1414 ansible.builtin.uri :
2222 " ttl " : 60,
2323 " type " : " TXT" ,
2424 " value " : " {{ acme_challenge['challenge_data'][item]['dns-01']['resource_value'] }}" ,
25- " zone_id " : " {{ lookup_zone_id .json.zones[0].id }}" ,
25+ " zone_id " : " {{ acme_lookup_zone_id .json.zones[0].id }}" ,
2626 }
2727 headers :
2828 Auth-API-Token : " {{ acme_hetzner_auth_token }}"
2929 loop : " {{ acme_domain.subject_alt_name }}"
30- register : records
30+ register : acme_records
3131 when :
3232 - acme_domain.subject_alt_name is defined
3333 # only runs if the challenge is run the first time, because then there is challenge_data
5959 method : DELETE
6060 headers :
6161 Auth-API-Token : " {{ acme_hetzner_auth_token }}"
62- loop : " {{ records | json_query('results[*].json.record.id') }}"
62+ loop : " {{ acme_records | json_query('results[*].json.record.id') }}"
6363 when :
6464 - acme_domain.subject_alt_name is defined
6565 # only runs if the challenge is run the first time, because then there is challenge_data
Original file line number Diff line number Diff line change 1414 name : _acme-challenge.{{ item | replace('*.', '') }}.
1515 zone : " {{ acme_domain.zone }}."
1616 loop : " {{ acme_domain.subject_alt_name }}"
17- register : records
1817 when :
1918 - acme_domain.subject_alt_name is defined
2019 - acme_challenge['challenge_data'][item] is defined
Original file line number Diff line number Diff line change 11---
2- - name : Create RSA key to be used for acme account
2+ - name : Create key to be used for acme account
33 community.crypto.openssl_privatekey :
44 path : " {{ acme_account_key_path }}"
5- size : 4096
6- type : RSA
5+ size : " {{ acme_account_key_size }}"
6+ type : " {{ acme_account_key_type }}"
7+ curve : " {{ acme_account_key_curve }}"
78 when :
89 - acme_account_key_content is not defined
910 no_log : true
1718 - acme_account_key_content is defined
1819 no_log : true
1920
20- - name : Create RSA key to be used for certificate
21+ - name : Create key to be used for certificate
2122 community.crypto.openssl_privatekey :
2223 path : " {{ acme_private_key_path }}"
24+ size : " {{ acme_private_key_size }}"
25+ type : " {{ acme_private_key_type }}"
26+ curve : " {{ acme_private_key_curve }}"
2327 when :
2428 - acme_private_key_content is not defined
2529 no_log : true
You can’t perform that action at this time.
0 commit comments