Ask Your Question

Problem applying manifest

asked 2013-01-11 14:03:16 -0600

theillien gravatar image

updated 2013-01-11 14:58:18 -0600

I have a puppet master (3.0.2-1; RHEL6) and the /etc/puppet/manifests/site.pp file contains the following:

import 'nodes/nodes.pp'

The nodes/nodes.pp file contains:

node 'agent1.example.dom' {
    include users

Naturally, the server domain is not what is in use, but has been changed to protect the innocent.

The users class is under /etc/puppet/modules/users. The manifests/users.pp file contains:

class users {
    group { 'admins':
        ensure => present,
        gid    => '501',
    user { 'user1':
        ensure           => present,
        uid              => '10000',
        gid              => '501',
        home             => '/home/user1',
        password_max_age => '60',
        password_min_age => '1',
        shell            => '/bin/bash',

If I remove the "include ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-01-11 14:43:12 -0600

llowder gravatar image

updated 2013-01-11 15:08:29 -0600

You have an errant comma after the include line

node 'agent1.example.dom' {
    include users,

should be:

node 'agent1.example.dom' {
    include users

You put the class in manifests/user.pp. Rename that to manifests/init.pp and the autoloader will pick it up and be able to see the class.

edit flag offensive delete link more


That eliminated one issue. Now I get this: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class users for tcecapm2r5pa01.ecap.cciio on ...(more)

theillien gravatar imagetheillien ( 2013-01-11 14:45:34 -0600 )edit

I missed the other typo. I've updated my answer to address that as well.

llowder gravatar imagellowder ( 2013-01-11 14:50:50 -0600 )edit

The class is called "users" not "user". The include already matches the spelling within the module manifest.

theillien gravatar imagetheillien ( 2013-01-11 14:55:03 -0600 )edit

I see that now, sorry. I've updated the answer once more. After re-rereading, I noticed the file names you used.

llowder gravatar imagellowder ( 2013-01-11 15:01:41 -0600 )edit

Changed the name of the file. That fixed it. Thanks!

theillien gravatar imagetheillien ( 2013-01-11 15:06:09 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-11 14:03:16 -0600

Seen: 1,132 times

Last updated: Jan 11 '13