## Role variables<a id="variables"></a>

{% if has_options %}
The following variables can be configured for this role:

| Variable | Type | Required | Default | Description |
|----------|------|----------|---------|-------------|
{% for var_name, var_spec in options.items() %}
| `{{ var_name | ansible_escape }}` | `{{ var_spec.type }}` | {{ 'Yes' if var_spec.required else 'No' }} | {{ var_spec.default | format_default }} | {{ var_spec.description | format_table_description }} |
{% endfor %}

### Variable details<a id="variable-details"></a>

{% for var_name, var_spec in options.items() %}
#### `{{ var_name }}`<a id="variable-{{ var_name }}"></a>

{{ var_spec.description | format_description }}

- **Type**: `{{ var_spec.type }}`
- **Required**: {{ 'Yes' if var_spec.required else 'No' }}
{% if var_spec.default is not none %}
- **Default**: {{ var_spec.default | format_default }}
{% endif %}
{% if var_spec.choices %}
- **Choices**: {{ var_spec.choices | map('string') | map('code_escape') | join(', ') }}
{% endif %}
{% if var_spec.elements %}
- **List Elements**: `{{ var_spec.elements }}`
{% endif %}

{% if var_spec.options %}
**Nested options**:

| Option | Type | Required | Default | Description |
|--------|------|----------|---------|-------------|
{% for sub_name, sub_spec in var_spec.options.items() %}
| `{{ sub_name }}` | {{ sub_spec.type }} | {{ 'Yes' if sub_spec.required else 'No' }} | {{ sub_spec.default | format_default }} | {{ sub_spec.description }} |
{% endfor %}
{% endif %}

{% endfor %}
{% else %}
No variables are defined for this role.
{% endif %}
