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

Parser removes ansible like comments #362

Open
1 task done
salemgolemugoo opened this issue Nov 22, 2024 · 0 comments
Open
1 task done

Parser removes ansible like comments #362

salemgolemugoo opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@salemgolemugoo
Copy link

Version

1.67.0

Describe the bug

Consider you have an ini file produced by Ansible's blockinfile

# BEGIN
[profile test]
sso_region              = us-east-1
sso_registration_scopes = sso:account:access
region                  = us-east-1
output                  = json
# END

If you add new sections at the end of the file the library is going to strip # END part and Ansible won't be able to recognize the text block anymore

To reproduce

Use the ini file provided in the description and try to add a new sections at the end of the file

Expected behavior

Keep the '# END' comment after the section

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@salemgolemugoo salemgolemugoo added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant