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

Add functionality to render local data and override local-zone template: #216

Merged
merged 3 commits into from
Dec 23, 2019
Merged

Add functionality to render local data and override local-zone template: #216

merged 3 commits into from
Dec 23, 2019

Conversation

findmyname666
Copy link

@findmyname666 findmyname666 commented Dec 15, 2019

  • Add a new param local_data which is an Array of Strings into localzone.pp. local_data will be add into a configuration file as defined in a template.
  • Add a new param template_name into localzone.pp. Therefore anybody can use a custom template.

  - Add a new param local_data which is an Array of Strings. local_data will be add into a configuration file as defined in a template.
  - Add a new param template_name. Therefore anybody can use a custom template.
Copy link
Member

@b4ldr b4ldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, one minor comment

#
define unbound::localzone (
Unbound::Local_zone_type $type,
String $zone = $name,
$config_file = $unbound::config_file,
Array[String] $local_data = [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be nice to create a custome type for resource records instead of just accepting any random string. something like

type unbound::local_data =  Struct[{
    name => String,
    type => String,
    data => String,
  }]
]

in yaml you would have

unbound::local_data:
  - name: foobar
    rrtype: A
    data: 192.0.2.1
  - name: foobar
    rrtype: TXT
    data: 'spf=foobar'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good suggestion to me. It will slightly complicate the template, but not much.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for ideas. I adjusted PR.

@zachfi
Copy link
Contributor

zachfi commented Dec 23, 2019

This looks great. Thank you for the PR.

@zachfi zachfi merged commit 2c2b5b4 into voxpupuli:master Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants