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

dynamic overwrite? #68

Open
gameforce opened this issue Sep 18, 2016 · 3 comments
Open

dynamic overwrite? #68

gameforce opened this issue Sep 18, 2016 · 3 comments

Comments

@gameforce
Copy link

How do you prevent this from overwriting dynamic updates?

@qs5779
Copy link

qs5779 commented Jun 30, 2017

I add my dynamic zones via an include directive and manage their initial zone file outside the module where I can specify "replace => no"

@gameforce
Copy link
Author

@qs5779 this is what I was trying to do but I'm a bit new to this could you give an example that I can use?

@qs5779
Copy link

qs5779 commented Jul 11, 2017

the excerpt below is from my setup with file names, ip addresses, hostnames and domain names changed for example

$varnameddynfiles = [
'12.168.192.ip4.ddns.rdns',
'6.6.6.6.6.6.6.6.6.6.6.6.6.6.6.2.ip6.ddns.rdns',
'my.sub.domain.com.ddns.zone',
'mydomain.ddns.zone'
]

$varnameddynfiles.each | $fn | {
file { "/var/named/dynamic/${fn}":
ensure => present,
group => 'named',
mode => '0640',
replace => 'no',
source => "puppet:///modules/profile/var/named/dynamic/${fn}"
}
}

$views = {
'a_local_resolver' => {
match-clients => [ '!key inside', '!key outside', 'localhost' ],
recursion => 'yes',
includes => [ '/var/named/my.view.localhost.zones', '/etc/named.rfc1912.zones' ]
},
'b_inside' => {
match-clients => [ 'key inside', 'my_locnets' ],
recursion => 'yes',
includes => [ '/var/named/my.view.inside.zones', '/etc/named.rfc1912.zones' ]
},
'c_outside' => {
match-clients => [ 'any' ],
includes => [ '/var/named/my.view.outside.zones' ]
}
}

in the above configuration my local view is the master for my dynamic zones and inside and outside are slaves

i have four dynamic zones two regular and two reverse, the private reverse zone is not in the outside view, and one of the regular zones is not in the outside view.

in this configuration the 4 base files are only used for the initial server setup as replace is "no", and after the server starts they are updated dynamically.

on occasions when i need to update ( add or delete ) a static entry i have to update the dynamic files and static files.

someday i hope to generate the originals and verify / update the dynamic files from a database, but that will only happen if I get around to it

anarcat pushed a commit to anarcat/puppet-bind that referenced this issue Nov 23, 2022
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

No branches or pull requests

2 participants