# Default

In the folder default you can have two different patterns:

  • Default variables defined
  • Variables not defined by default but useful for your role

# Default variables defined

If you define a default variable, they will be retrieved by Ansible-nwd and their default values will be written in the documentation file.

Moreover, you can add information about these variables following this pattern:

your_variable: your_value # description of your variable;type

For example :

default_variable1: 1.8 # default variable1 version;number
default_variable2: 2.7 # default variable2 version;number
other_variable: 3.4 # other variable version;number
test: 4.5

Will create this entry in your documentation file :

Variable Value Description Type
default_variable1 1.8 default variable1 version number
default_variable2 2.7 default variable2 version number
other_variable 3.4 other variable version number
test 4.5 n/a n/a

# Variables not defined by default

There are some variables that you cannot define by default or not mandatory for your role.

With Ansible-nwd you can define some variables thank to tags in comment.

For example, if you want to specify a variable which is not defined as default you can do it following this pattern:

# @var variable;description;type;example;mandatory(bool)

For example :

# @var variable;variable description;type;example;false
# @var variable2;description2;type2;example2;true

Will create this entry in your documentation file :

Variable Type Mandatory Example Description
variable type false example variable description
variable2 type2 true example2 description2