This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'mysql' | |
import 'apache' | |
node default { | |
include users | |
include db | |
include apache_server | |
exec {"apt-update": | |
command => "apt-get update", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define mysql::createdb { | |
exec { "create-${name}-db": | |
unless => "mysql -uroot -p${config::mysqlRootPassword} ${name}", | |
command => "mysql -uroot -p${config::mysqlRootPassword} -e \"create database ${name}; grant all on ${name}.* to ${config::dbUser}@localhost identified by '${config::dbPassword}';\"", | |
require => Service["mysql"], | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class config { | |
include config::install, config::config, config::service | |
Class['puppet::service'] -> Class['config::install'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class config { | |
include config::install, config::config, config::service | |
Class['config::install'] -> Class['puppet::service'] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class hostgroup::frontend { | |
include passenger | |
include nodejs | |
include nrpe::rubyprocs | |
} | |
class passenger { | |
include apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apache::params: | |
class apache::params { | |
$vgname = 'vg01' | |
$lvname = 'wwwlv' | |
$lvsize = '2G' | |
$fstype = 'ext4' | |
$fsname = "/dev/${vgname}/${lvname}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { '/etc/yum.repos.d/': | |
ensure => directory, | |
mode => '0755', | |
force => true, | |
purge => true, | |
recurse => true, | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$perl_modules = [ 'Data::Pageset', 'perl-module-b' ] | |
perlbrew::install_modules { | |
$perl_modules: | |
perl => 'a-version-of-perl' | |
} | |
perlbrew::install_modules { | |
$perl_modules: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class sshd::data { | |
$enable = extlookup('sshd_enable', 'present') | |
} | |
class sshd { | |
include sshd::params, sshd::data |