Hello fellow Foremen,
I am digging more and more into Puppet and am reaching out to control that
with Foreman.
I am developing my puppet classes using a vagrant vm and puppet apply. Now
I am moving the working classes to foreman and most of them don't show up
in foreman classes lists. I imported from the master and the modules from
forge show up with no problem, but most of y own do not. They work as
expected when included in a node definition in site.pp
Are there any guidelines how a puppet class has to look like to work in
foreman?
For example, using puppetlabs-apache and other classes, I want to set up my
webserver like this:
from modules/my-apache/manifests/init.pp:
class my-apache {
package { "cronolog":
ensure => "installed"
}
class { 'apache':
default_mods => false,
default_confd_files => false,
mpm_module => 'prefork';
}
include apache::mod::rewrite
include apache::mod::auth_basic
include apache::mod::authn_file
include apache::mod::authz_default
include apache::mod::authz_user
class { 'php': }
php::module { "imagick": }
php::module { "gd": }
php::module { 'xdebug':}
php::augeas { 'php-memorylimit':
entry => 'PHP/memory_limit',
value => '128M';
'php-date_timezone':
entry => 'Date/date.timezone',
value => 'Europe/Berlin';
'php-error_reporting':
entry => 'PHP/error_reporting',
value => 'E_ALL & ~E_NOTICE';
'php-display_errors':
entry => 'PHP/display_errors',
value => 'off';
'php-session_cache-limiter':
entry => 'Session/session.cache_limiter',
value => 'nocache';
'php-session_autostart':
entry => 'Session/session.auto_start',
value => '0';
'php-expose_php':
entry => 'PHP/expose_php',
value => 'off';
'php-allow_url_fopen':
entry => 'PHP/allow_url_fopen',
value => 'off';
}
···
# # V E R Z E I C H N I S S E # file {['/srv', '/srv/www']: ensure => directory, owner => 'root', group => 'root', mode => '0644', }file {[’/etc/ssl’, ‘/etc/ssl/certs’, ‘/etc/ssl/intermediate’,
’/etc/ssl/private’]:
ensure => directory,
owner => ‘root’,
group => ‘root’,
mode => ‘0644’,
}
…
}
Thanks in advance
Jochen