mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
fix(lego): compare pubkey against merged configuration and provide a default key type
This commit is contained in:
parent
2ff5fac58d
commit
12eb1aa48b
2 changed files with 4 additions and 2 deletions
|
@ -72,6 +72,7 @@ lego_acme_account_defaults:
|
|||
- "mailto:{{ lego_certificate.email }}"
|
||||
|
||||
lego_certificate_renewal_days: 30
|
||||
lego_configuration_default_key_type: "ec256"
|
||||
|
||||
lego_configuration_defaults:
|
||||
command_parameters:
|
||||
|
@ -80,6 +81,7 @@ lego_configuration_defaults:
|
|||
accept-tos: true
|
||||
email: "{{ lego_certificate.email }}"
|
||||
path: "{{ lego_base_path }}"
|
||||
key-type: "{{ lego_configuration_default_key_type }}"
|
||||
run: {}
|
||||
renew:
|
||||
days: "{{ lego_certificate_renewal_days }}"
|
||||
|
|
|
@ -162,8 +162,8 @@
|
|||
vars:
|
||||
lego_certificate_wanted_keytype: >-2
|
||||
{{
|
||||
"ECC" if "ec" in lego_configuration.command_parameters.global["key-type"]
|
||||
else "RSA" if "rsa" in lego_configuration.command_parameters.global["key-type"]
|
||||
"ECC" if "ec" in lego_configuration_merged.command_parameters.global["key-type"]
|
||||
else "RSA" if "rsa" in lego_configuration_merged.command_parameters.global["key-type"]
|
||||
}}
|
||||
when: "lego_certificate_stat.stat.exists"
|
||||
changed_when: "lego_certificate_pubkey_type_differs"
|
||||
|
|
Loading…
Reference in a new issue