On Friday, September 2, 2011 at 10:46 AM, Mitch Anderson wrote: > I'm just starting out with puppet, and I'm trying to get one of the > new environments I'm managing using puppet. The site is apache/php, > so I've been trying to use one of the prewritten apache modules... > without any luck... so I've ended up taking snippits of a few > different ones... anyway, I'm getting this error: > > err: Could not run Puppet configuration client: Parameter require > failed: No title provided and "libapache2-mod-php5" is not a valid > resource reference > > from a class I'm building to define the "site", it looks like this: > > # Papercoterie Web Server > class example_www { > include server_default > include apache2 > include apache2::ssl > > #modules to install > $wantedpackages = ["libapache2-mod-php5",] > package { "libapache2-mod-php5": ensure => installed } > > # enable modules in apache > apache2::module{"php5": require => "libapache2-mod-php5" } Your require is missing a title, as noted by the error. This line above should read:
apache2::module{'php5': require => Package['libapache2-mod-php5'] } > # setup site in apache > apache2::site { 'example.com (http://example.com)': > ensure => 'present', > priority => 10, > modules => $modules, > docroot => "/var/www/example.com/current (http://example.com/current)", > } > } > > within my module "apache2" > > I have a module.pp file that looks like: > define apache2::module( $ensure = 'present', $require = 'apache2' ) { > case $ensure { > 'present' : { > exec { "a2enmod $name": > unless => "test ! -e /etc/apache2/mods- > enabled/$name.load", > notify => Service["apache2"], > require => Package[$require], > } > } > 'absent': { > exec { "a2dismod $name": > onlyif => "test ! =e /etc/apache2/mods- > enabled/$name.load", > notify => Service["apache2"], > require => Package["apache2"], > } > } > default: { err ( "Unknown ensure value: '$ensure'" ) } > } > } # end modules > > Currently everything validates and runs fine on the clients (puppet > master is ubuntu 11.04 2.6.4) > Clients will all be ubuntu 10.04 but I have a different PPA installed > for puppet and their version is: 2.6.3. > > what am I doing wrong? -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.