role_hcio/templates/service.j2.backup
2025-04-10 16:43:05 +02:00

19 lines
506 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# {{ ansible_managed }}
[Unit]
Description={{ item.name }}
After=network.target
[Service]
Type=oneshot
{% if item.cmd is defined %}
ExecStart={{ item.cmd }} && /usr/bin/curl -s --retry 5 -o /dev/null {{ hcio_url }}/ping/{{ uuid }}
{% elif item.script is defined %}
ExecStart={{ hcio_path }}/scripts/{{ item.script | basename }} "{{ hcio_url }}/ping/{{ uuid }}"
{% else %}
ExecStart=/usr/bin/curl -s --retry 5 -o /dev/null {{ hcio_url }}/ping/{{ uuid }}
{% endif %}
[Install]
WantedBy=multi-user.target