thanks Ken. that was a typo. The problem turned out to be that in the file resources I was specifying
content => template($conf_template) I wasn't really using templates just so I took the template call out like so ... content => $conf_template On Fri, Jul 27, 2012 at 7:39 AM, Ken Barber <k...@puppetlabs.com> wrote: >> I am able to install my RPM via this puppet code ... >> >> [root@agent1 ~]# puppet apply -v install_named_conf.pp >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb >> info: Applying configuration version '1343316240' >> notice: /Stage[main]//Package[eir-named-conf]/ensure: created >> notice: Finished catalog run in 5.52 seconds >> [root@agent1 ~]# rpm -q eir-named-conf >> eir-named-conf-0.1-1 >> [root@agent1 ~]# cat install_named_conf.pp >> package { 'eir-named-conf' : >> ensure => installed, >> } >> >> ... but when I attempt to do the same in a class that looks like this ... >> >> class eir-bind ( $dns_type, $enable = true, $ensure = running) { >> >> $conftop = '/apps/DNS/client/etc' >> >> case $dns_type { >> RPZ : { >> $conf_template = >> "${conftop}/named.conf.rpz_master" >> $rpz_zone_template = "${conftop}/rpz.cisco.com.db" >> } >> } >> case $operatingsystem { centos, redhat: { $service_name = 'named' >> } } >> >> $packages = [ 'bind', 'eir-bind-conf' ] >> Package { ensure => installed, } >> package { $packages : } >> >> service { 'named': >> name => $service_name, >> ensure => $ensure, >> enable => $enable, >> require => Package['eir-bind-conf'], >> subscribe => File['named.conf'], >> } >> >> file { 'named.conf': >> path => '/apps/DNS/conf/named.conf', >> ensure => file, >> require => Package['eir-bind-conf'], >> content => template($conf_template), >> } >> >> file { 'rpz.cisco.com.db': >> path => '/apps/DNS/zones/rpz.cisco.com.db', >> ensure => file, >> require => Package['eir-bind-conf'], >> content => template($rpz_zone_template), >> } >> } >> >> class { 'eir-bind' : dns_type => 'RPZ', } >> >> ... and then execute ... >> >> [root@agent1 bind]# yum remove eir-named-conf >> ... >> Removed: >> eir-named-conf.noarch 0:0.1-1 >> >> Complete! >> [root@agent1 bind]# rpm -q eir-named-conf >> package eir-named-conf is not installed >> >> [root@agent1 bind]# puppet apply -v init.pp >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb >> info: Loading facts in >> /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb >> info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb >> No such file or directory - /apps/DNS/client/etc/named.conf.rpz_master at >> /root/bind/init.pp:49 on node agent1.localdomain >> [root@agent1 bind]# rpm -q eir-named-conf >> package eir-named-conf is not installed >> >> ... why doesn't puppet install the RPM eir-named-conf ? > > In the code example you have provided, you've specified the package > name as 'eir-bind-conf' not 'eir-named-conf': > > $packages = [ 'bind', 'eir-bind-conf' ] > Package { ensure => installed, } > package { $packages : } > > Not sure if thats just a typo in the example - if not, thats most > probably your problem. > > ken. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.