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

pxp-agent config written as single line without \n #16

Open
bastelfreak opened this issue Apr 5, 2024 · 0 comments
Open

pxp-agent config written as single line without \n #16

bastelfreak opened this issue Apr 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bastelfreak
Copy link

bastelfreak commented Apr 5, 2024

Describe the Bug

The pxp-agent config file (/etc/puppetlabs/pxp-agent/pxp-agent.conf) misses the \n at the end. The FHS also defines that a line has to end with one: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206

[root@pe ~]# file /etc/puppetlabs/pxp-agent/pxp-agent.conf
/etc/puppetlabs/pxp-agent/pxp-agent.conf: ASCII text, with very long lines, with no line terminators
[root@pe ~]#

Also the whole file is a single line which makes it really ugly to read. I don't know if this is supposed to be JSON or HOCON. On slack someone mentioned it's HOCON. However the docs say pxp-agent uses JSON: https://github.com/puppetlabs/pxp-agent?tab=readme-ov-file#configuring-the-agent

Expected Behavior

Please create a .json config file and write a multiline string into with, with proper indentation and trailing \n. Please use stdlib::to_json_pretty() to render it. That's the default function from Puppet to render JSON, so it should be used here.

Steps to Reproduce

  • Install latest PE 2021 or PE 2023
  • file /etc/puppetlabs/pxp-agent/pxp-agent.conf

Environment

  • PE 2021.7.7

Additional Context

Similar to #13. I would also like to propose a patch or at least show the required changes here. But the PE license is a bit unclear and I don't know if I'm allowed to post the source code ¯\_(ツ)_/¯

@bastelfreak bastelfreak added the bug Something isn't working label Apr 5, 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