ansible-doctor/example/README.md

141 lines
2.5 KiB
Markdown
Raw Normal View History

2019-10-09 23:25:33 +02:00
# demo-role-custom-header
2021-01-17 15:10:33 +01:00
[![Build Status](https://img.shields.io/drone/build/thegeeklab/ansible-doctor?logo=drone)](https://drone.thegeeklab.de/thegeeklab/ansible-doctor)
2020-12-31 15:06:20 +01:00
[![License: GPL-3.0](https://img.shields.io/github/license/thegeeklab/ansible-doctor)](https://github.com/thegeeklab/ansible-doctor/blob/main/LICENSE)
2019-10-08 13:03:45 +02:00
Role to demonstrate ansible-doctor. It is also possible to overwrite the default description with an annotation.
2019-10-08 13:03:45 +02:00
2019-10-08 13:43:41 +02:00
## Table of content
2021-01-17 15:10:33 +01:00
- [Default Variables](#default-variables)
- [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)
2019-10-08 13:43:41 +02:00
2019-10-08 13:28:58 +02:00
---
2019-10-08 13:43:41 +02:00
## Default Variables
2019-10-08 13:03:45 +02:00
### demo_role_dict
2019-10-08 13:03:45 +02:00
#### Default value
```YAML
demo_role_dict:
key1:
sub: some value
2019-10-08 13:03:45 +02:00
```
#### Example usage
```YAML
demo_role_dict:
key1:
sub: some value
key2:
sublist:
- subval1
- subval2
2019-10-08 13:03:45 +02:00
```
### demo_role_empty
#### Default value
```YAML
demo_role_empty: ''
```
### 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.
2019-10-08 13:03:45 +02:00
#### Default value
```YAML
demo_role_empty_dict: {}
```
#### Example usage
```YAML
demo_role_empty_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.
2019-10-08 13:03:45 +02:00
#### Default value
```YAML
demo_role_other_tags: []
```
#### Example usage
```YAML
2019-10-11 08:59:38 +02:00
demo_role_other_tags:
2019-10-08 13:03:45 +02:00
- package1
- package2
```
### demo_role_single
#### Default value
```YAML
demo_role_single: b
```
2019-10-08 13:03:45 +02:00
### 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_"`
2019-10-11 08:59:38 +02:00
2019-10-08 13:03:45 +02:00
#### Default value
```YAML
demo_role_undefined_var: _unset_
2019-10-08 13:03:45 +02:00
```
### 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
```
2019-10-08 13:03:45 +02:00
## Dependencies
None.
## License
MIT
## Author
Robert Kaussow <mail@example.com>