Code Monkey home page Code Monkey logo

Comments (5)

countsudoku avatar countsudoku commented on June 25, 2024

Sorry, I was wrong! The quoting can be set by the caller for arrays.

from puppet-unbound.

zachfi avatar zachfi commented on June 25, 2024

Not a worry, glad you sorted it out.

from puppet-unbound.

FredericLespez avatar FredericLespez commented on June 25, 2024

I stumbled on the same problem and I don't understand what you were meaning by:

The quoting can be set by the caller for arrays.

As far as I can see, the double quotes are hardcoded in the erb template:

local-data: "<%= rr %>"

So how do you handle TXT records containing double quotes and spaces (like DKIM records) ?

Thanks in advance for your help.

from puppet-unbound.

countsudoku avatar countsudoku commented on June 25, 2024

My comment above

Sorry, I was wrong! The quoting can be set by the caller for arrays.

was for the local-data part in the templates/unbound.conf.erb:

<%= print_config('local-data', @local_data) -%>

If you hand over something like this:

$local_data = [
    "'mail._domainkey.example.com 14400 IN TXT \"v=DKIM1;h=sha256;k=rsa;\"\"p=DKIM_KEY_PART_1\"\"DKIM_KEY_PART_2\"'"
]

to the unbound class:

class { '::unbound':
    …,
    local_data => $local_data,
    …,
}

you will get, what you want.

For the quoting in templates/local_zone.erb you are absolutely right. So my comment above was right by accident:

I would suggest to use single quotes for all local-data entries.

But I would suggest to do this on all local-data config locations

from puppet-unbound.

FredericLespez avatar FredericLespez commented on June 25, 2024

Thanks a lot for your answer. I identified two ways to insert local-data (local_zone and record) but I missed the third one :-)
May be I will propose a pull request to automatically single quote TXT records and split them into pieces of 255 characters.

from puppet-unbound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.