Re: Trying, Trying and Trying and still cannot make puppet and client work :-(

56 views
Skip to first unread message

Hoof Hearted

unread,
Dec 28, 2012, 1:36:45 AM12/28/12
to puppet...@googlegroups.com
what does your puppetmaster's site.pp have in it? Also, I'm not super sure, but you might want to at least make the puppetmaster and client the same version. If you don't have the packages readily available you could install them easily via gem. 

On Thursday, December 27, 2012 10:55:38 AM UTC-8, ratotopi wrote:
I have two box with centos 6.3 and centos 5.8 running  puppet master 3.0 and puppet client 2.7  respectively. I can make master work when I use "puppet apply" on it and it works fine but I have not been able to do that with client, I cannot make it work, when i run the following command in client it shows the following output

puppet agent --test --server='puppet.xyz.com'
info: Caching catalog for puppetclient.xyz.com
info: Applying configuration version '1356631880'
notice: Finished catalog run in 0.06 seconds

and on master when i give the following command it works

puppet apply -e "include squid"

/Stage[main]/Squid/Package[squid]/ensure: created
Finished catalog run in 39.18 seconds

Puppet master has the init.pp files in /etc/puppet/modules/squid/manifests/init.pp which contains following lines :-

class squid {
case $operatingsystem {
        centos, redhat: {
        $service_name = 'squid'
        $conf_file    = 'squid.conf'
}
}

package { 'squid':
  ensure => 'installed',
}

service { 'squid':
  ensure => 'stopped',
  enable => 'false',
  require => Package [ 'squid' ]
 }
 }

What else do I need to do to make client work. I have searched internet and they show different command and some of them not even work what should I do to learn puppet and make it work. Thank you for your input.

 

Keiran Sweet

unread,
Dec 28, 2012, 6:26:47 AM12/28/12
to puppet...@googlegroups.com
Hi There,
A couple of suggestions if you are starting to learn Puppet.
* Build an environment where you are using the same major release of the software, ie All 3.x or 2.7 master/clients
  Although it is supported to have masters running later versions, consistency is key when you are learning the basics.

* Familiarize yourself with how nodes are classified to apply configurations to nodes.

In your example , you have created a module to manage squid, and it is only applied when you apply the squid class to the machine via the include statement.

To make this persistent, you need to classify your node, most commonly via a node definition in the site.pp manifest file.

Have a read of this document about node definitions, it should help you: http://docs.puppetlabs.com/puppet/2.7/reference/lang_node_definitions.html

You may also find the following very useful:

* Pro Puppet - James Turnbull & Jeffrey McCune
* The Puppet cookbook - http://puppetcookbook.com/

Cheers,

K

Hoof Hearted

unread,
Dec 28, 2012, 1:03:06 PM12/28/12
to puppet...@googlegroups.com
In addition to all that, one quick thing to lower the barrier to entry is to just start off with this in your default node: 

node default {
  notify {"hello world": }
Reply all
Reply to author
Forward
0 new messages