Add Technical_Decomp_Manifest
parent
598ab639e9
commit
8b54d60765
1 changed files with 33 additions and 0 deletions
33
Technical_Decomp_Manifest.md
Normal file
33
Technical_Decomp_Manifest.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
## enroll/manifest.py
|
||||
|
||||
### _IndentDumper (inner class inside _yaml_dump_mapping)
|
||||
|
||||
#### Purpose: makes PyYAML output indentation match stricter linters/Ansible expectations.
|
||||
|
||||
#### What it subclasses:
|
||||
|
||||
yaml.SafeDumper
|
||||
|
||||
#### Override:
|
||||
|
||||
- increase_indent(self, flow=False, indentless=False)
|
||||
- it forces indentless=False when calling the superclass, which prevents PyYAML’s common behavior of emitting:
|
||||
```
|
||||
key:
|
||||
- item
|
||||
```
|
||||
- and instead prefers:
|
||||
|
||||
```
|
||||
key:
|
||||
- item
|
||||
```
|
||||
|
||||
#### Lifecycle / where it’s used:
|
||||
|
||||
Only used when PyYAML is available.
|
||||
|
||||
manifest uses _yaml_dump_mapping() for:
|
||||
- role defaults (defaults/main.yml)
|
||||
- host_vars role data (inventory/host_vars/...)
|
||||
- ensuring stable formatting.
|
||||
Loading…
Add table
Add a link
Reference in a new issue