I have new to puppet.I am trying to install appache using puppet code but
getting below error.
please help me how to resolve this issue.
Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Server Error: Evaluation Error: A substring operation does not accept a
String as a character index. Expected an Integer (file:
/etc/puppetlabs/code/environments/production/modules/mediawiki/manifests/init.pp,
line: 62, column: 25) on node puppet-slave.us-east-2.compute.internal
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
this is is my init.pp file code
---------------------------------------------------------
class mediawiki {
$phpmysql = $osfamily?{
'RedHat' => 'php-mysql',
'Debian' => 'php5-mysql',
'Default' => 'php-mysql',
}
package{$phpmysql:
ensure => 'present',
}
if $osfamily == 'RedHat'{
package{'php-xml':
ensure => 'present',
}
}
class {'::apache':
docroot => '/var/www/html',
mpm_module => 'prefork',
subscribe => package[$phpmysql],
}
class {'::apache::mod::php':}
}
--this is my site.pp file
---------------------------------------------------------------------
node 'puppet-slave'{
class{'linux':}
class{'mediawiki':}
}
node 'puppet-slave1'{
class{'linux':}
class{'mediawiki':}
}
class linux{
$httpdservice = $osfamily?{
'RedHat' => 'httpd',
'Debian' => 'apache',
'Default' => 'httpd',
}
$admintools=['git','nano']
package{
$admintools:
ensure => 'present',
}
file{'/info.txt':
ensure => 'present',
content=> 'this is created by puppet',
}
}
please somebody help me what could be the problem .how to resolve.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/ab4347f4-f460-4fd9-aedd-d14803f322ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.