Ansible Filters: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:
|-
|-
| [[Ansible_Concepts#Variables|Variable]]-related filters ||  
| [[Ansible_Concepts#Variables|Variable]]-related filters ||  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
<span id='default'></span>[[Ansible Filter default|default]]<br>
<span id='default'></span>[[Ansible Filter default|default]]<br>
<span id='mandatory'></span>[[Ansible Filter mandatory|mandatory]]<br>
<span id='mandatory'></span>[[Ansible Filter mandatory|mandatory]]<br>
Line 30: Line 29:
| Miscellaneous ||
| Miscellaneous ||
<span id='ternary'></span>[[Ansible Filter ternary|ternary]]<br>
<span id='ternary'></span>[[Ansible Filter ternary|ternary]]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
|-
|-
|}
|}

Revision as of 20:09, 4 July 2021

External

Internal

Overview

Ansible file content can be manipulated with filters.

Ansible Filters

Category Filters
Variable-related filters

default
mandatory

Data type management filters

type_debug
dict2items
items2dict
Casting

YAML and JSON Formatting

to_json
to_nice_json
to_yaml
to_nice_yaml

Miscellaneous

ternary