Class not found for simple class!

347 views
Skip to first unread message

Amit Shah

unread,
May 10, 2012, 7:09:58 PM5/10/12
to Puppet Users
puppet 2.6.4
puppet --configprint modulepath
/home/user/.puppet/modules:/usr/share/puppet/modules

I have the following file defined: /home/user/.puppet/modules/apacheWS/
manifests

#init.pp

class apacheWS {
case $operatingsystem{
ubuntu:{ $apache="apache2"}
}

package {'apache':
name=>$apache,
ensure=>installed,
}

file{ 'testfile':
path => '/tmp/testfile',
ensure => present,
mode => 0604,
content => 'test file data',
#require=> Service['apached'],
}

service{ 'apached':
name=>$apache,
ensure=> running,
enable=> true,

}

notify {'message':
message=>"I created a file",
}

Package['apache']->File['testfile']->Service['apached']-
>Notify['message']
}

When I try "puppet -apply -e "include apacheWS"
puppet apply -e "include apacheWS"
Could not find class apacheWS at line 1 on node ubuntu.localdomain
user@ubuntu:~/.puppet/modules/apacheWS/manifests$

WHY?! Why is something so simple so broken.

Ryan Coleman

unread,
May 11, 2012, 12:38:29 PM5/11/12
to puppet...@googlegroups.com
Unfortunately, you'll need to rename your apacheWS folder to apachews. 
Reply all
Reply to author
Forward
0 new messages