document the removal of keys in ini files
which requires an empty dictionary in playbook YAML config_overrides parameter Change-Id: I3ab9c434883e743738b3e06d54c3c54c84bc7217
This commit is contained in:
parent
dae35c0bc3
commit
2ccc59fa13
@ -42,6 +42,7 @@ Playbook:
|
|||||||
|
|
||||||
[section1]
|
[section1]
|
||||||
option1 = value1
|
option1 = value1
|
||||||
|
option2 = value2
|
||||||
dest: "test_dst.conf"
|
dest: "test_dst.conf"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
config_overrides:
|
config_overrides:
|
||||||
@ -49,6 +50,7 @@ Playbook:
|
|||||||
cruel: world
|
cruel: world
|
||||||
section1:
|
section1:
|
||||||
option1: value2
|
option1: value2
|
||||||
|
option2: {}
|
||||||
orderedListSection:
|
orderedListSection:
|
||||||
listOpt:
|
listOpt:
|
||||||
- listItem1
|
- listItem1
|
||||||
@ -78,6 +80,11 @@ Resulting file on the remote host:
|
|||||||
multiStrOpOption = multiStrOp1
|
multiStrOpOption = multiStrOp1
|
||||||
multiStrOpOption = multiStrOp2
|
multiStrOpOption = multiStrOp2
|
||||||
|
|
||||||
|
Take notice of the `option2` in `section1`, which is removed in the output but
|
||||||
|
requires an empty dictionary in the playbook YAML. The empty dictionary is
|
||||||
|
translated to `None` value and the default behavior is to remove keys with
|
||||||
|
`None` values. See parameter `ignore_none_type`, which defaults to `true`.
|
||||||
|
|
||||||
A practical example would be for something like OpenStack's nova.conf where the
|
A practical example would be for something like OpenStack's nova.conf where the
|
||||||
input of:
|
input of:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user