# {{ ansible_managed }} [Unit] Description={{ item.1.socket_name }} socket {% for target in item.1.after_targets | default([]) %} After={{ target }} {% endfor %} {% for target in item.1.before_targets | default([]) %} Before={{ target }} {% endfor %} {% for target in item.1.bind_targets | default([]) %} BindsTo={{ target }} {% endfor %} [Socket] Service={{ item.0.service_name | replace(' ', '_') }}.service {% for key, var in item.1.options.items() | default({}) %} {{ key }}={{ var }} {% endfor %} [Install] WantedBy=sockets.target