FAQ

On Wed, 2012-08-01 at 14:47 -0700, red wrote:
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.
The reason that this is failing is indirectly a result of the fact that
puppet is designed to run in a master/agent configuration. First, take a
look at the graphs at
http://docs.puppetlabs.com/learning/agent_master_basic.html#what-do-agents-do-and-what-do-masters-do

The "templates" functionality is designed for having a set of templates
stored in the puppet directory on the master. As a result, the templates
are evaluated in the "Compile" step, which runs on the puppet master -
since the agent can't see them!

The RPM for your package isn't installed until much later; in the Apply
step which runs on the puppet agent. Naturally, it never gets there
because the "Compile" step failed.

Since the erb template files contain a bunch of puppet-specific ruby
code in them, it usually doesn't make sense to have them separate from
your puppet '.pp' files.
[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
For this case, it might make sense to not have a package at all, but
instead simply have puppet put the files in place directly with 'file'
resources. You can then keep these config files together with the puppet
file, in a git repository for example.

It would make sense to bundle everything together into a puppet
"module", even if you aren't using a master/agent setup. Read through
http://docs.puppetlabs.com/learning/modules1.html#modules to find out
how this works.

--
Calvin Walton <calvin.walton@kepstin.ca>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 1, '12 at 9:47p
activeAug 2, '12 at 4:43a
posts3
users2
websitepuppetlabs.com

2 users in discussion

Red: 2 posts Calvin Walton: 1 post

People

Translate

site design / logo © 2022 Grokbase