jrock2004
jrock2004

Reputation: 3501

Cannot get puppet agent to work

I am trying to setup puppet on an agent machine. On the agent machine I was able to run the command and when I checked master I signed its certificate. Now on the agent machine I run the following command

sudo puppet agent --test --onetime --verbose

I get the following output

Info: Retrieving plugin
Info: Caching catalog for vpuppetslave.jrock20041.dyndns.org
Info: Applying configuration version '1373014974'

On the agent machine, here is the puppet.conf file

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
server = mediacenter.jrock20041.dyndns.org

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

[agent]
server = mediacenter.jrock20041.dyndns.org

On the master machine, here is my site.pp file

import 'nodes.pp'

On the master machine, here is my nodes.pp file

node 'mediacenter' {
    #include nginx
    #include openssh-server
    #include ssh

    file { '/tmp/hello':
            content => "Hello, World!\n",
    }

    user { 'jcostanzo':
            ensure     => present,
            comment    => 'John Costanzo',
            home       => '/home/jcostanzo',
            managehome => true,
    }
}

node 'vpuppetslave' {
    #include nginx
    #include openssh-server
    #include ssh

    file { '/tmp/hello':
            content => "Hello, World!\n",
    }

    user { 'jcostanzo':
            ensure     => present,
            comment    => 'John Costanzo',
            home       => '/home/jcostanzo',
            managehome => true,
    }
}

Not sure what I am doing wrong. Thanks for the help

Upvotes: 1

Views: 660

Answers (1)

jrock2004
jrock2004

Reputation: 3501

Ok, I finally have figured out where I went wrong. There were issues on both the master and the agent.

Master

My manifest files was in my user home directory and not in the /etc/puppet directory. Once I fixed that up, that was fine

Agent

I was putting the configuration in /etc/puppet instead ~/.puppet/ directory.

Once I fixed those two things up, I was fine and now I am working.

Upvotes: 2

Related Questions