[ Prev ] [ Index ] [ Next ]

Variables

Created Donnerstag 06 Februar 2020


Source


Name

Persists of letters, numbers and underscores. They should start with letters.


Location

Can define and use them in:


Dictionary


Definition

foo:
  field1: one
  field2: two
test_var: 1568


Access

Use quotes if the variable is directly after the statment.

"{{ foo['field1'] }}"
"{{ foo.field1 }}"
"{{ test_var }}"
This is a variable {{ test_var }} # Can be withoot because it can't be mistaken with a dictionary


Key/Value


YAML

<Group>:
  vars:
    ntp_server: ntp.atlanta.example.com
    proxy: proxy.atlanta.example.com


Ini

[<group>:vars]
ntp_server=ntp.atlanta.example.com
proxy=proxy.atlanta.example.com


Usage