This role is useful for generating XML configuration files with input-validation and formatting control.
None.
Standard template options are supported, except for
block_end_string
, block_start_string
, lstrip_blocks
, src
, trim_blocks
,
variable_end_string
, and variable_start_string
.
Additional parameters are:
Required | Type | Comment |
---|---|---|
dest | string | Path to generated file. |
schema | dict | Allowed tags and attributes. |
value | dict | XML content to render. |
Optional | Type | Comment | Default |
---|---|---|---|
header | string | Static header | {{ ansible_managed|comment("xml") }} |
spaces | int | Tag indent | 2 |
None.
(Data copied from Qt Documentation)
Combine recipe values with schema to produce a cookbook.
- hosts: localhost
tasks:
- include_role:
defaults_from: 'examples/recipes/values.yml'
name: 'xml'
vars_from: 'examples/recipes/schema.yml'
vars:
dest: 'cookbook.xml'
- Tests
- Better examples
- Code a way to require that an element must contain one of a list of attributes, or be non-empty.
BSD
Robert August Vincent II
(pronounced "Bob" or "Bob-Vee")