Add roles for lego, logcli, mimir, process_exporter, smokeping_prober, and vector

This commit is contained in:
2024-04-14 17:13:06 -05:00
parent ce692e4560
commit b02da06c97
51 changed files with 1417 additions and 0 deletions

View 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 %}

View 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

View 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