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

Add ability to process multi-document YAML files #2290

Merged
merged 1 commit into from Aug 13, 2022

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Aug 13, 2022

Closes: #2288

Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

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

Cool! I hadn't considered multi document yaml files. I wonder if --write messes them up.

src/ansiblelint/utils.py Outdated Show resolved Hide resolved
@ssbarnea
Copy link
Member Author

Cool! I hadn't considered multi document yaml files. I wonder if --write messes them up.

Multi-documents are extremely uncommon, but you might want to add some code to avoid messing them if you encounter them. I spotted on inside debops repo, that is why I made this fix.

@ssbarnea ssbarnea merged commit ae93f91 into ansible:main Aug 13, 2022
@cognifloyd
Copy link
Member

Another example: I frequently see multi-document yaml with kubernetes resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multi-document yaml files are not supported
2 participants