-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Bug] beats_metricbeat_package newline character issue #357
Comments
Great find! I'll look into it and I'll see if there's something similar elsewhere in the code. Then I'll try to provide a fix. |
I can't reproduce the error. Ok, I tried it with Ubuntu 24.04 but Metricbeat installed without problems with the options you've given. Because it's a simple fix, I'll provide a PR but we have to test a bit more before we can merge it. |
widhalmt
added a commit
that referenced
this issue
Jan 22, 2025
* Use '>-' instead of '>' for YAML multline when creating package names. The extra newline at the end of the string can cause JSON parsing errors as reported by @cbeaujoin-stellar . This change will strip the newline character after the name fixes #357
Hello, I'm using:
|
tbauriedel
pushed a commit
that referenced
this issue
Jan 31, 2025
* Use '>-' instead of '>' for YAML multline when creating package names. The extra newline at the end of the string can cause JSON parsing errors as reported by @cbeaujoin-stellar . This change will strip the newline character after the name fixes #357
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please try to fill out as much of the information below as you can. Thank you!
Yes, I've searched similar issues on GitHub and didn't find any.
Which version contains the bug?
Current
Describe the bug
ansible-collection-elasticstack/roles/beats/tasks/metricbeat.yml
Line 5 in 87a7dc6
beats_metricbeat_package
is being constructed with a newline character at the end (\n), which is causing a JSON parsing error. in theInstall Metricbeat - *
tasks.This is happening because of the > YAML folded scalar operator used in the set_fact task.
We can manage it with the YAML scalar operator by using >- instead of >.
The minus sign tells YAML to strip the trailing newline.
How to recreate the bug?
The text was updated successfully, but these errors were encountered: