openstack-ansible-lxc_conta.../templates/post-up-down.oneshot.j2

18 lines
408 B
Django/Jinja

[Unit]
Description=Post-up Post-down oneshot networking service
After=network.target
[Service]
Type=oneshot
{% for command in item.value.postup | default([]) | union(lxc_container_default_postup) %}
ExecStart={{ command }}
{% endfor %}
{% for command in item.value.postdown | default([]) | union(lxc_container_default_postdown) %}
ExecStop={{ command }}
{% endfor %}
[Install]
WantedBy=multi-user.target