var rendering

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

Demo

source

Main task yaml file
    tasks:
    - name: task
      task:
      - func: shell
        vars:
          student: Tom
          gender: Male
          school: Sydney Grammar
          info: |
            my student: {{.student}}
            student's gender: {{.gender}}
            school's name: {{.school}}
        do:
        - |
          echo """{{.info}}"""
    
Main log file
    loading [Config]:  ./tests/functests/upconfig.yml
    Main config:
                 Version -> 1.0.0
                  RefDir -> ./tests/functests
                 WorkDir -> cwd
              AbsWorkDir -> /up_project/up
                TaskFile -> c0022
                 Verbose -> vvv
              ModuleName -> self
               ShellType -> /bin/sh
           MaxCallLayers -> 8
                 Timeout -> 3600000
     MaxModuelCallLayers -> 256
               EntryTask -> task
      ModRepoUsernameRef -> 
      ModRepoPasswordRef -> 
    work dir: /up_project/up
    -exec task: task
    loading [Task]:  ./tests/functests/c0022
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    Task1: [task ==> task:  ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "student": "Tom",
      "gender": "Male",
      "school": "Sydney Grammar",
      "up_runtime_task_layer_number": 0,
      "info": "my student: {{.student}}\nstudent's gender: {{.gender}}\nschool's name: {{.school}}\n"
    })
    
    cmd( 1):
    echo """{{.info}}"""
    
    
    -
    my student: {{.student}}
    student's gender: {{.gender}}
    school's name: {{.school}}
    
    
    -
     .. ok
    . ok
    
Logs with different verbose level
Raw logs with different verbose level