initial ansible code
This commit is contained in:
19
roles/lego/templates/lego.service.j2
Normal file
19
roles/lego/templates/lego.service.j2
Normal file
@@ -0,0 +1,19 @@
|
||||
## Managed by Ansible ##
|
||||
|
||||
[Unit]
|
||||
Description=Run lego renew
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
Environment={{ lego_provider|upper }}_API_KEY={{ vault_ionos_token_dns }}
|
||||
ExecStart={{ lego_install_dir }}/lego \
|
||||
{% for dns in certificate_domains %}
|
||||
--domains="{{ dns }}" \
|
||||
{% endfor %}
|
||||
{{ lego_cli_params|join(' ') }} \
|
||||
renew
|
||||
User=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
12
roles/lego/templates/lego.timer.j2
Normal file
12
roles/lego/templates/lego.timer.j2
Normal file
@@ -0,0 +1,12 @@
|
||||
## Managed by Ansible ##
|
||||
|
||||
[Unit]
|
||||
Description=Start lego renew
|
||||
|
||||
[Timer]
|
||||
Persistent=true
|
||||
OnCalendar=Mon 05:00:00
|
||||
RandomizedDelaySec=3600
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user