The expression {{ depend "az1-net1/ID" }} denotes a dependency on the ID property of the resource az1-net1.
The depend template function is available only for playbooks. To turn a document yml into a playbook, simply add this line {{/* =% text %= */}} at the top of the file (see the .yml files in this PR). This makes it possible to include arbitrary text file into a playbook (e.g. referencing it in a playbook.yml and subsequently with infrakit use <playbook> <friendly_name_of_file_in_index>. The playbook support in the infrakit CLI will download all the referenced files and cache them locally. This simplifies working with yml config files as they no longer need to be referenced via the file:// url to read locally. Instead, we can just use playbook commands like
infrakit local mystack/resource commit -y <(infrakit use res chain2.yml)
This PR adds a new template function for playbooks to simplify the notation of dependencies.
For example:
The expression
{{ depend "az1-net1/ID" }}
denotes a dependency on theID
property of the resourceaz1-net1
.The
depend
template function is available only for playbooks. To turn a document yml into a playbook, simply add this line{{/* =% text %= */}}
at the top of the file (see the .yml files in this PR). This makes it possible to include arbitrary text file into a playbook (e.g. referencing it in aplaybook.yml
and subsequently withinfrakit use <playbook> <friendly_name_of_file_in_index>
. The playbook support in the infrakit CLI will download all the referenced files and cache them locally. This simplifies working with yml config files as they no longer need to be referenced via thefile://
url to read locally. Instead, we can just use playbook commands likeSigned-off-by: David Chung david.chung@docker.com