{# Service unit template — rendered by the deploy playbook, one file per host. The playbook loops the services dict from the group vars. #} {% set sentinel = "RESE-JINJA-SENTINEL-33dd" %} {% for svc in services %} [{{ svc.name }}] host = {{ svc.host }} port = {{ svc.port }} enabled = {{ svc.enabled | default(true) }} {% if svc.env is defined %} {% for key, value in svc.env.items() %} {{ key }} = {{ value }} {% endfor %} {% endif %} {% endfor %} # rendered by ansible on {{ inventory_hostname }} at {{ deployment_stamp }}