Add roles for lego, logcli, mimir, process_exporter, smokeping_prober, and vector
This commit is contained in:
8
roles/lego/templates/environ.conf.j2
Normal file
8
roles/lego/templates/environ.conf.j2
Normal file
@ -0,0 +1,8 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Service]
|
||||
{% if lego_user_environ is defined %}
|
||||
{% for k, v in lego_user_environ.items() %}
|
||||
Environment={{ k | upper }}={{ v }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
31
roles/lego/templates/lego@.service.j2
Normal file
31
roles/lego/templates/lego@.service.j2
Normal file
@ -0,0 +1,31 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
[Unit]
|
||||
Description=Let's Encrypt client and ACME library written in Go
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
{% if lego_environ is defined %}
|
||||
{% for k, v in lego_environ.items() %}
|
||||
Environment={{ k | upper }}={{ v }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Type=oneshot
|
||||
User={{ lego_user_name }}
|
||||
ExecStart={{ lego_bin_path }} \
|
||||
{% for arg in lego_bin_args | default([]) + lego_bin_user_args | default([]) %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
renew \
|
||||
{% for arg in lego_bin_renew_user_args | default([]) %}
|
||||
{{ arg }} {% if not loop.last %}\{{ "\n"}}{% endif %}
|
||||
{% if loop.last %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
WorkingDirectory={{ lego_var_dir_path }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
roles/lego/templates/lego@.timer.j2
Normal file
11
roles/lego/templates/lego@.timer.j2
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Certbot renewal
|
||||
Description=Let's Encrypt client and ACME library written in Go
|
||||
Requires={{ lego_service_name }}%i
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 00,12:00:00
|
||||
# RandomizedDelaySec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user