ansible-lockdown / UBUNTU22-CIS

Ansible role for Ubuntu22 CIS Baseline
https://ansible-lockdown.readthedocs.io/en/latest/
MIT License
181 stars 80 forks source link

Allow multi-line banners #123

Closed tomi-bigpi closed 11 months ago

tomi-bigpi commented 1 year ago

Overall Review of Changes: Currently a multi-line banner will cause the YAML file to be invalid. This change ensures a valid YAML format without changing behavior.

Issue Fixes: Haven't opened an issue.

Enhancements: Please list any enhancements/features that are not open issue tickets

How has this been tested?: Manually tested with multi-line banner text.

uk-bolly commented 11 months ago

hi @tomi-bigpi

Thank you for raising this PR and helping to improve ansible-lockdown. The change makes sense, just like to understand why the indent has been added to line? We are trying to ensure all code is consitent where possible without exceptions. Is there something taht we can do to assist here?

many thanks

uk-bolly

tomi-bigpi commented 11 months ago

Hi @uk-bolly the indent is there to ensure the multi-line YAML is valid when using the | block syntax (with newlines). The indents do not show up in the final banners.

References: https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html https://yaml-multiline.info/