Author: Robert Kaussow <mail@geeklabor.de>
Date:   Sat Aug 22 20:29:58 2020 +0200

    fix docs
This commit is contained in:
Robert Kaussow 2020-08-22 18:34:53 +00:00
parent 0b536fb4b7
commit 0fa31f8998
4 changed files with 65 additions and 0 deletions

10
_index.md Normal file
View File

@ -0,0 +1,10 @@
---
title: general
geekdocFlatSection: true
---
General custom content collection for Ansible.
<!-- spellchecker-disable -->
{{< toc-tree >}}
<!-- spellchecker-enable -->

3
filters/_index.md Normal file
View File

@ -0,0 +1,3 @@
---
title: Filters
---

26
filters/prefix.md Normal file
View File

@ -0,0 +1,26 @@
Simple filter to prefix all items from a list. Default prefix will be `--` but you can also pass a custom one.
## Example
```Yaml
my_list:
- item1
- item2
{{ my_list | prefix | join(' ') }}
# result:
# "--item1 --item2"
```
Or pass a custom prefix:
```Yaml
my_list:
- item1
- item2
{{ my_list | prefix(prefix='-') | join(' ') }}
# result:
# "-item1 -item2"
```

26
filters/wrap.md Normal file
View File

@ -0,0 +1,26 @@
Simple filter to wrap all items form a list. Default will wrap items in single quotes but you can also pass a custom wrapper character.
## Example
```Yaml
my_list:
- item1
- item2
{{ my_list | wrap | join(',') }}
# result:
# "'item1','item2'"
```
Or pass a custom wrapper:
```Yaml
my_list:
- item1
- item2
{{ my_list | wrap(wrapper='/') | join(',') }}
# result:
# "/item1/,/item2/"
```