mirror of
https://github.com/famedly/ansible-collection-base
synced 2024-11-10 06:24:17 +00:00
feat(lego): make HTTP challenge port configurable
This commit is contained in:
parent
7c42199b1e
commit
a821a2f405
2 changed files with 11 additions and 3 deletions
|
@ -60,6 +60,7 @@ lego_letsencrypt_environment: "staging"
|
|||
|
||||
lego_challenge:
|
||||
type: "http"
|
||||
lego_challenge_http_port: 80
|
||||
|
||||
lego_letsencrypt_servers:
|
||||
prod: "https://acme-v02.api.letsencrypt.org/directory"
|
||||
|
|
|
@ -2,9 +2,16 @@
|
|||
lego_challenge_mergeable:
|
||||
command_parameters:
|
||||
global: "{'{{ lego_challenge.type }}': '{{ lego_challenge.provider | default('') }}'}"
|
||||
lego_configuration_merged: >-
|
||||
{{ lego_configuration_defaults | combine(lego_challenge_mergeable, recursive=True)
|
||||
| combine(lego_configuration | default({}), recursive=True) }}
|
||||
lego_challenge_http_mergeable:
|
||||
command_parameters:
|
||||
global: "{'http.port': ':{{ lego_challenge_http_port }}'}"
|
||||
lego_configuration_merged: >-2
|
||||
{{
|
||||
lego_configuration_defaults
|
||||
| combine(lego_challenge_mergeable, recursive=True)
|
||||
| combine(lego_challenge_http_mergeable if lego_challenge.type == 'http' else {}, recursive=True)
|
||||
| combine(lego_configuration | default({}), recursive=True)
|
||||
}}
|
||||
|
||||
# Build global command
|
||||
lego_command_domains: >-2
|
||||
|
|
Loading…
Reference in a new issue