tinet
tinet copied to clipboard
RFC: templates feature
After tinet up. this feature creates files on docker containers with html/template
.
---
nodes:
- name: hoge
image: hoge
vars:
bgp_on: "yes"
out: "test text"
templates:
- dst: /etc/frr/daemons
src: daemons.j2
- dst: /etc/out.txt
content: |
test "{{ .out }}"
...
https://golang.org/pkg/text/template/
I hate myself to enable with this syntax... X(
postinit:
cmds:
- cmd: |
cat <<EOF >/tmp/out1.txt
line1
line2
EOF
- cmd: docker cp /tmp/out1.txt R1:/out1.txt