github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0022.yml (about)

     1  doc_meta: |
     2    folder: vars
     3    title: var rendering
     4    head: |
     5      The vars defined in UP cli command are like constants defined by user, the var contains reference to other vars is just like a definition or declaration of a variable which is not substituded fully to its completed form yet, it is a anchor to be used and expanded in runtime, which will be detailed in the advanced topic in chapter of dvar
     6  
     7    sections:
     8      - title: Demo
     9        log: yes
    10  
    11  notes:
    12    goal:
    13      - to show the problem that it requires further var expanding to get real value
    14  
    15  tasks:
    16  
    17    - name: task
    18      task:
    19        -
    20          func: shell
    21          vars:
    22            student: Tom
    23            gender: Male
    24            school: Sydney Grammar
    25            info: |
    26              my student: {{.student}}
    27              student's gender: {{.gender}}
    28              school's name: {{.school}}
    29          do:
    30            - |
    31              echo """{{.info}}"""