ansible-doctor/example/README.md

150 lines
2.8 KiB
Markdown

# demo-role-custom-header
[![Build Status](https://img.shields.io/drone/build/thegeeklab/ansible-doctor?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/ansible-doctor)
[![License: GPL-3.0](https://img.shields.io/github/license/thegeeklab/ansible-doctor)](https://github.com/thegeeklab/ansible-doctor/blob/main/LICENSE)
Role to demonstrate ansible-doctor. It is also possible to overwrite the default description with an annotation.
## Table of content
- [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)
---
## Default Variables
### demo_role_dict
#### Default value
```YAML
demo_role_dict:
key1:
sub: some value
```
#### Example usage
```YAML
demo_role_dict:
key1:
sub: some value
# Inline description
key2:
sublist:
- subval1
- subval2
```
### demo_role_empty
#### Default value
```YAML
demo_role_empty: ''
```
### demo_role_empty_dict
... or valid json can be used. In this case, the json will be automatically prefixed with the annotation key and filters like `to_nice_yaml` can be used in templates. To get it working, the json need to be prefixed with a `$`.
#### 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.
#### Default value
```YAML
demo_role_other_tags: []
```
#### Example usage
```YAML
demo_role_other_tags:
- package1
- package2
```
### demo_role_single
#### Default value
```YAML
demo_role_single: b
```
### demo_role_undefined_var
To highlight a variable that has not set a value by default, this is one way to achieve it. Make sure to flag it as json value: `@var demo_role_undefined_var: $ "_unset_"`
#### Default value
```YAML
demo_role_undefined_var: _unset_
```
### demo_role_unset
Values can be plain strings, but there is no magic or autoformatting...
#### Default value
```YAML
demo_role_unset:
```
#### Example usage
```YAML
demo_role_unset: some_value
```
## Open Tasks
- Unscoped general todo.
- (bug): Some bug that is known and need to be fixed.
- (bug): Multi line description are possible as well. Some bug that is known and need to be fixed.
- (improvement): Some things that need to be improved.
## Dependencies
None.
## License
MIT
## Author
John Doe