Hello all,
I am new to puppet and I am try to come up with a proof of concept for setting up a DNS server.
I think I can just get by with just running puppet directly on my host without setting up a master/agent type configuration.
This maybe related to the my problem but I suspect not.
Here's the problem I am having:
When I run ...
[root@agent1 bind]# puppet apply init.pp
... I get this error ...
No such file or directory - /apps/DNS/puppet_template/rpz.localdomain.db.erb at /root/bind/init.pp:38 on node agent1.localdomain
The file /apps/DNS/puppet_template/rpz.localdomain.db.erb should get installed from the RPM I created, rie-rpz-named-conf.
This RPM is accessible via YUM on the host agent1 ...
[root@agent1 bind]# yum list rie-rpz-named-conf
...
Available Packages
rie-rpz-named-conf.noarch 0.1-1 RIE-repository
... rie-rpz-named-conf.noarch contains the file /apps/DNS/puppet_template/rpz.localdomain.db.erb
[root@agent1 rie-rpz-named-conf]# rpm -q --filesbypkg -p rie-rpz-named-conf-0.1-1.noarch.rpm
rie-rpz-named-conf /apps/DNS/README
rie-rpz-named-conf /apps/DNS/conf/named.conf
rie-rpz-named-conf /apps/DNS/etc/rndc.conf
rie-rpz-named-conf /apps/DNS/puppet_template/rpz.localdomain.db.erb
rie-rpz-named-conf /etc/init.d/named
My puppet file, init.pp, looks like this ...
[root@agent1 bind]# cat init.pp
class rie-bind ( $dns_type, $enable = true, $ensure = running) {
case $dns_type {
RPZ : {
package { 'bind':
ensure => installed,
before => Package ['rie-rpz-named-conf'],
}
package { 'rie-rpz-named-conf':
ensure => installed,
before => File ['/apps/DNS/puppet_template/rpz.localdomain.db.erb'],
}
file { '/apps/DNS/puppet_template/rpz.localdomain.db.erb':
ensure => file,
}
file { '/apps/DNS/named/rpz.localdomain.db':
ensure => file,
source => template("/apps/DNS/puppet_template/rpz.localdomain.db.erb"),
}
service { 'named':
name => $service_name,
ensure => $ensure,
enable => $enable,
}
}
}
}
# for testing
class { 'rie-bind' : dns_type => 'RPZ', }
... so my question is, "Why doesn't my RPM, rie-rpz-named-conf, get install "BEFORE" the file resource File ['/apps/DNS/puppet_template/rpz.localdomain.db.erb']?
Here is some additional info that maybe useful:
[root@agent1 bind]# puppet --version
2.7.12 (Puppet Enterprise 2.5.1)
Thank you from an enthusiastic puppet newbie!