Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multi-line banners #123

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

tomi-bigpi
Copy link
Contributor

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.

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

Signed-off-by: tomi-bigpi <[email protected]>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the Discord Server as well.

@uk-bolly
Copy link
Member

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
Copy link
Contributor Author

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/

Copy link
Member

@uk-bolly uk-bolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@uk-bolly uk-bolly merged commit 625c74d into ansible-lockdown:devel Oct 23, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants