Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: templates feature #52

Open
slankdev opened this issue Aug 22, 2020 · 2 comments
Open

RFC: templates feature #52

slankdev opened this issue Aug 22, 2020 · 2 comments

Comments

@slankdev
Copy link
Contributor

slankdev commented Aug 22, 2020

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 }}"
...
@slankdev
Copy link
Contributor Author

@slankdev
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant