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

json written as .yaml file for code-manager config #13

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

json written as .yaml file for code-manager config #13

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

Comments

@bastelfreak
Copy link

Describe the Bug

code-manager uses a r10k.yaml at /opt/puppetlabs/server/data/code-manager/r10k.yaml. Three issues:

  • The content is json, not yaml (yes json is a yaml subset, but still this looks wrong)
  • It's a single line and not properly formatted, which makes it incredible hard to read
  • There is no \n at the end which breaks the prompt in the terminal:
# file /opt/puppetlabs/server/data/code-manager/r10k.yaml
/opt/puppetlabs/server/data/code-manager/r10k.yaml: ASCII text, with very long lines, with no line terminators
[root@pe ~]# cat /opt/puppetlabs/server/data/code-manager/r10k.yaml
{"sources":{"puppet":{"remote":"git@github.com:bastelfreak/controlrepo.git","basedir":"/etc/puppetlabs/code-staging/environments","invalid_branches":"error"}},"cachedir":"/opt/puppetlabs/server/data/code-manager/git","forge":{"baseurl":"https://forgeapi.puppetlabs.com"},"git":{"private_key":"/etc/puppetlabs/puppetserver/ssh/ed25519","repositories":[],"provider":"shellgit"},"deploy":{"purge_levels":["deployment","environment","puppetfile"],"purge_allowlist":[".resource_types"],"exclude_spec":true},"pool_size":4}[root@pe ~]#

Also editors tend to automatically add the missing \n.

Expected Behavior

a proper yaml with indentation and final \n at the end. Please use stdlib::to_yaml().

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'

Environment

  • PE 2021.7.7

Additional Context

Add any other context about the problem here.

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