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

Don't wrap yaml lines for confs #160

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Don't wrap yaml lines for confs #160

merged 2 commits into from
Sep 6, 2024

Conversation

mattmix
Copy link
Contributor

@mattmix mattmix commented Sep 5, 2024

The default behavior of to_yaml is to wrap lines to 80 characters, but confs can be erb templates that can exceed that and get broken by the forced line wrap. For example, this hiera:

openondemand::confs:
  support_ticket:
    template: true
    data:
      support_ticket:
        email:
          to: [email protected]
          delivery_method: sendmail

        attributes:
          username:
            value: "<%= CurrentUser.name %>"
            readonly: true
          email:
            value: "<%= %x{ldapsearch -x uid=#{CurrentUser.name} mail | grep -Po 'mail: \\K[^\\s]+' } %>"

email.value is linewrapped when processed through to_yaml, breaking the ERB template.

The fix in this PR is to not line wrap.

@treydock treydock closed this Sep 6, 2024
@treydock treydock reopened this Sep 6, 2024
@treydock treydock added the bugfix Something isn't working label Sep 6, 2024
manifests/conf.pp Outdated Show resolved Hide resolved
@treydock treydock merged commit 94dbd35 into OSC:master Sep 6, 2024
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants