mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-24 22:00:40 +00:00
docs: update demo-role example [skip ci]
This commit is contained in:
parent
247a5a0083
commit
46d62a4f61
@ -8,13 +8,13 @@ Role to demonstrate ansible-doctor. It is also possible to overwrite the default
|
||||
## Table of content
|
||||
|
||||
* [Default Variables](#default-variables)
|
||||
* [demo_role_unset](#demo_role_unset)
|
||||
* [demo_role_empty](#demo_role_empty)
|
||||
* [demo_role_single](#demo_role_single)
|
||||
* [demo_role_empty_dict](#demo_role_empty_dict)
|
||||
* [demo_role_dict](#demo_role_dict)
|
||||
* [demo_role_empty](#demo_role_empty)
|
||||
* [demo_role_empty_dict](#demo_role_empty_dict)
|
||||
* [demo_role_other_tags](#demo_role_other_tags)
|
||||
* [demo_role_single](#demo_role_single)
|
||||
* [demo_role_undefined_var](#demo_role_undefined_var)
|
||||
* [demo_role_unset](#demo_role_unset)
|
||||
* [Dependencies](#dependencies)
|
||||
* [License](#license)
|
||||
* [Author](#author)
|
||||
@ -23,20 +23,26 @@ Role to demonstrate ansible-doctor. It is also possible to overwrite the default
|
||||
|
||||
## Default Variables
|
||||
|
||||
### demo_role_unset
|
||||
|
||||
You can set values as string, but there is no magic or autoformatting...
|
||||
### demo_role_dict
|
||||
|
||||
#### Default value
|
||||
|
||||
```YAML
|
||||
demo_role_unset:
|
||||
demo_role_dict:
|
||||
key1:
|
||||
sub: some value
|
||||
```
|
||||
|
||||
#### Example usage
|
||||
|
||||
```YAML
|
||||
demo_role_unset: some_value
|
||||
demo_role_dict:
|
||||
key1:
|
||||
sub: some value
|
||||
key2:
|
||||
sublist:
|
||||
- subval1
|
||||
- subval2
|
||||
```
|
||||
|
||||
### demo_role_empty
|
||||
@ -47,14 +53,6 @@ demo_role_unset: some_value
|
||||
demo_role_empty: ''
|
||||
```
|
||||
|
||||
### demo_role_single
|
||||
|
||||
#### Default value
|
||||
|
||||
```YAML
|
||||
demo_role_single: b
|
||||
```
|
||||
|
||||
### demo_role_empty_dict
|
||||
|
||||
... or you can use a valid json. In this case, the json will be automatically prefixed with the annotation key and you can use e.g. `to_nice_yaml` filter in your templates. To get this working, you have to prefix your json with a `$` char.
|
||||
@ -77,28 +75,6 @@ demo_role_empty_dict:
|
||||
- subval2
|
||||
```
|
||||
|
||||
### demo_role_dict
|
||||
|
||||
#### Default value
|
||||
|
||||
```YAML
|
||||
demo_role_dict:
|
||||
key1:
|
||||
sub: some value
|
||||
```
|
||||
|
||||
#### Example usage
|
||||
|
||||
```YAML
|
||||
demo_role_dict:
|
||||
key1:
|
||||
sub: some value
|
||||
key2:
|
||||
sublist:
|
||||
- subval1
|
||||
- subval2
|
||||
```
|
||||
|
||||
### demo_role_other_tags
|
||||
|
||||
If a variable need some more explanation, this is a good place to do so.
|
||||
@ -117,6 +93,14 @@ demo_role_other_tags:
|
||||
- package2
|
||||
```
|
||||
|
||||
### demo_role_single
|
||||
|
||||
#### Default value
|
||||
|
||||
```YAML
|
||||
demo_role_single: b
|
||||
```
|
||||
|
||||
### demo_role_undefined_var
|
||||
|
||||
If you want to add an explicit notice, that a var is not set by default, this is one option. Make sure to flag it as json value: `@var demo_role_undefined_var: $ "_unset_"`
|
||||
@ -127,6 +111,22 @@ If you want to add an explicit notice, that a var is not set by default, this is
|
||||
demo_role_undefined_var: _unset_
|
||||
```
|
||||
|
||||
### demo_role_unset
|
||||
|
||||
You can set values as string, but there is no magic or autoformatting...
|
||||
|
||||
#### Default value
|
||||
|
||||
```YAML
|
||||
demo_role_unset:
|
||||
```
|
||||
|
||||
#### Example usage
|
||||
|
||||
```YAML
|
||||
demo_role_unset: some_value
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
None.
|
||||
|
Loading…
Reference in New Issue
Block a user