Giter VIP home page Giter VIP logo

puppet-dns's People

Contributors

ablionge avatar agx avatar andybrucenet avatar antaflos avatar bastelfreak avatar benjamin-robertson avatar coreone avatar domcleal avatar ehelms avatar ekohl avatar gregsutcliffe avatar ikonia avatar inecas avatar jfroche avatar jkrauska avatar kajinamit avatar karelyatin avatar ladynamedlaura avatar lzap avatar marcdeop avatar mbarecki avatar mmoll avatar roidelapluie avatar sathieu avatar smortex avatar treydock avatar uip9av6y avatar wbclark avatar wclarke1 avatar zyronix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-dns's Issues

Missing zone options

I would like to set several options inside zones that are currenty not supported by named.zone.erb. Would you like to make me a merge request with a bunch of new dns::zone parameters or with an additional_options parameter?

named-checkconf on named.conf fails due to execution order problem

In our environment the following error is thrown when using the dns module:

Error: /Stage[main]/Dns::Config/Concat[/etc/named.conf]/File[/etc/named.conf]/content: change from '{md5}bdddc3e08bde5104b16abf184f83c595' to '{md5}6b06a55481ffdc7be89c2dcf03cbeede' failed: Execution of '/usr/sbin/named-checkconf /etc/named.conf20220309-56666-ap026i' returned 1: /etc/named.conf20220309-56666-ap026i:16: open: /etc/named/zones.conf: file not found (corrective)

We found that this must be an execution order problem as the named.conf includes the statement

include "/etc/named/zones.conf";

We fixed the problem in our code with the following execution order constraint:

Concat['/etc/named/zones.conf']->Concat['/etc/named.conf']

In the modules code the code in config.pp (

concat { $dns::namedconf_path:
) should be extended like the following to address the issue

  concat { $dns::namedconf_path:
    owner        => 'root',
    group        => $dns::params::group,
    mode         => '0640',
    require      => [
     Concat[$dns::optionspath],
     Concat[$dns::publicviewpath],
    ]
    validate_cmd => $validate_cmd,
  }

Module can generate invalid configuration when zonetype => forward

When declaring a dns::zone resource with zonetype => 'forward' and also setting manage_file/manage_file_name, or even masters, allow_transfer, etc then the resulting configuration in zones.conf is invalid and named refuses to start, with error messages like this:

named[13888]: /etc/bind/zones.conf:14: option 'allow-query' is not allowed in 'forward' zone 'foo.example.com'
named[13888]: /etc/bind/zones.conf:13: option 'allow-transfer' is not allowed in 'forward' zone 'foo.example.com'
named[13888]: /etc/bind/zones.conf:15: option 'also-notify' is not allowed in 'forward' zone 'foo.example.com'
named[13888]: /etc/bind/zones.conf:11: option 'masters' is not allowed in 'forward' zone 'foo.example.com'
named[13888]: /etc/bind/zones.conf:12: option 'notify' is not allowed in 'forward' zone 'foo.example.com'
named[13888]: loading configuration: failure
named[13888]: exiting (due to fatal error)

I will submit a PR to fix this.

Add support for adding keys for nsupdate

Hey,

I am in the middle of evaluating a foreman puppet setup, trying out all the foreman smart proxy features. I want to do everything through puppet and u guys have pretty good modules already for that. But i can't find how I would be able to add a key to bind for foremans nsupdates, shoulnd this be supported by this module or am I missing something ?

Best regards

create-rndc.key fails with bind9 9.13.0+

With isc-projects/bind9@3a4f820 -r option is removed in confgen command, so now if -r /dev/urandom is passed to the command then it fails due to fatal("The -r option has been deprecated.").

I see it's used at two place in puppet-dns code:-

Also looks this parameter is not mandatory in earlier bind versions and confgen works without it too, but may be it was passed for some use case, Anyway it would be good to get it fixed for bind-9.13.0+.

Faced this while testing with bind-9.16.11 on a CentOS9 machine.

How does this module manage zones ?

Hi,

I'm sorry but I'm a bit confuse with the capabilites of this module.
I was able to create a zone exemple.com.
But I would like that my DNS records to be manage by puppet too.

I didn't see anything in the code which allow me to create dns records into a specific zone.

Can you please explain to me what this module manage exactly ?

Thank you !

ACLs are unusable with allow_transfer

The following beaker test fails on Debian 10 and probably other distros, even though it might encode a desirable setup:

diff --git a/spec/acceptance/dns_spec.rb b/spec/acceptance/dns_spec.rb
index 50f6729..8ddc748 100644
--- a/spec/acceptance/dns_spec.rb
+++ b/spec/acceptance/dns_spec.rb
@@ -14,12 +14,15 @@ describe 'Scenario: install bind' do
 
   let(:pp) do
     <<-EOS
-    include dns
+    class { 'dns':
+      acls => { 'trusted' => ['10.0.0.0/24'] },
+    }
 
     dns::zone { 'example.com':
       soa     => 'ns1.example.com',
       soaip   => '192.0.2.1',
       soaipv6 => '2001:db8::1',
+      allow_transfer => ['"trusted"'],
     }
     EOS
   end

The error is due to named-checkconf:

Error: Execution of '/usr/sbin/named-checkconf /etc/bind/zones.conf20200501-1763-1xd9g1x' returned 1: /etc/bind/zones.conf20200501-1763-1xd9g1x:7: undefined ACL 'trusted'

Interestingly there are other ACL-capable clauses that do not care about undefinedness in the same config file.

The best solution I can come up with, is to place acl, view and zone definitions into the same config file.

Manage zone records

Hello,

Is there a way to manage zones records ?
I would like Puppet to enforce my complete bind configuration.

Actually, zone.header.erb only manages the header of the file.
Is there a way without concat to add my records (A, CNAME, ...) at the bottom ?

Thank you !

Add package_ensure parameter

init.pp has service_ensure and service_enable, but no package_ensure. install.pp thus always ensures the package is present. There is no way to use this module without having it install the package, or to enforce the installed version (like latest).

This would be a useful feature, like in our case where we want to use puppet to create the configuration, but don't want it installed because we want to run bind in a Docker container.

Make zone template configurable

Is it possible to make the location of the named.zone.erb template configurable like the other templates? This way i can manage the base zone settings from a custom template and keep the config clean.

Managing of BIND system group should be optional

In our organisation we manage system users and groups (like bind in this case) globally, using Hiera and our own user account module. This way we have control over user and group IDs, home directories, shells, etc from a single source.

This conflicts with modules that unconditionally manage users and groups using the Puppet types user or group, like this module does with the BIND system group.

I have created PR #139 to make managing the system group optional (but enabled by default) to fix this.

It's not possible to have BIND not listen on port 53 in ipv6

If I want to have BIND listen on a different port on v4, I can do the following:

class { '::dns':
  additional_options => {
    'listen-on' => 'port 5322 { any; }',
  }
}

However, for ipv6, there's the listen_on_v6 parameter that will always be present in the template:

listen-on-v6 { <%= scope.lookupvar('::dns::listen_on_v6') %>; };

There's no way to precise the port so it will always be on port 53.

For backwards compatibility purposes, I recommend adding a condition in the template -- if listen_on_v6 is defined, add it with the value.
If someone wants more "advanced" config, such as listening on v6 on an alternate port, he can set listen_on_v6 to false and use additional_options like the snippet at the beginning of this issue:

class { '::dns':
  listen_on_v6       => false,
  additional_options => {
    'listen-on'    => 'port 5322 { any; }',
    'listen-on-v6' => 'port 5322 { any; }'
  }
}

no support for also-notify option

Hi,

Could you add support for the 'also-notify' option in the option.conf file, to allow notifications to slave dns hosts that do not have NS records.

Thanks

Fails with puppetlabs/concat 4.1.1

When using theforeman/dns 5.1.0 with puppetlabs/concat 4.1.1, my catalogues fail to compile with the following error:

no parameter named 'format' at [...]/modules/concat/manifests/init.pp:94 on Concat_file[/etc/bind/zones.conf] at [...]/modules/concat/manifests/init.pp:94 on node foo.example.com

Minor glitch in README

README says that this project is licensed under GPLv3+ but LICENSE and metadata says ASL 2.0, could you fix it, please?

zones.conf missing when chroot enabled

The EL6 /etc/sysconfig/named documents a list of files and directories that are mounted into named chroot when ROOTDIR is set. The /etc/zones.conf file is not in the list, my guess is the location is not what bind expects. I can submit a PR that modifies the path of zones.conf to be /etc/named/zones.conf, but wanted to get an idea if such a change would be accepted.

Config file validation fails in Ubuntu 22.04 because named-checkconf is installed in a different path

The named-checkconf command is installed not in /usr/sbin but in /usr/bin in Ubuntu 22.04.
https://packages.ubuntu.com/jammy/bind9-utils

Because of this change, applying a manifest with dns::config_check => true (this is default) fails with the following error in Ubuntu 22.04.

2023-03-14 01:27:22 +0000 /Stage[main]/Dns::Config/Concat[/etc/bind/zones.conf]/File[/etc/bind/zones.conf]/ensure (err): change from 'absent' to 'file' failed: Execution of '/usr/sbin/named-checkconf /etc/bind/zones.conf20230314-5533-1381cdx' returned 1: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log/destinations.rb:112:in `flush': Bad file descriptor (Errno::EBADF)
	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log/destinations.rb:112:in `handle'
	...
	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
	from /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:360:in `exec': No such file or directory - /usr/sbin/named-checkconf (Errno::ENOENT)
	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:360:in `block (2 levels) in execute_posix'
	...
	from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
	from /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

No Fedora support

OS detection is just $operatingsystem and it only supports redhat/centos, no $osfamily or Fedora.

sysconfig_file for Debian and Ubuntu is wrong and has long changed to /etc/default/named

Currently this module still writes to /etc/default/bind9, but since Debian Bullseye and at least Ubuntu Focal (20.04) the defaults was renamed to /etc/default/named.

See https://salsa.debian.org/dns-team/bind9/-/blob/debian/9.18/debian/bind9.named.service#L10
unfortunately there was never a note in the release notes (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23993257), but still the current value is wrong.``

DNS class written by theforeman doesn't allow editing zones in theforeman

Having installed this module I find that it's not possible to edit the zone parameter. Some classes need some manual editing to work "theforeman" way but I would've expected a class written by you guys to work "out of the box". I'd appreciate a little guidance as your documentation is virtually non-existent

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.