Skip to content

Instantly share code, notes, and snippets.

@parisk
Created July 4, 2017 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parisk/4a4e0a9d3941e5dc798c80fb26b17bfd to your computer and use it in GitHub Desktop.
Save parisk/4a4e0a9d3941e5dc798c80fb26b17bfd to your computer and use it in GitHub Desktop.
Castor Payload Templates
{% load docker_events %}
{% with event|get_attribute:"com.sourcelair.ceryx.host" as source %}
{% if source %}
{% with event|get_attribute:"com.sourcelair.ceryx.port" as port %}
{
"source": "{{ source }}",
"destination": "{{ event.Actor.ID }}:{{ port }}"
}
{% endwith %}
{% else %}
{}
{% endif %}
{% endwith %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment