This file contains hidden or 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
# Install pear via package, and install necessary modules. | |
class manage_pear { | |
include | |
'pear', | |
'manage_pear::packages' | |
package { 'php5-dev' : | |
ensure => present, | |
} | |
} |
This file contains hidden or 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 pear::packages { | |
exec { 'pecl-mongodb' : | |
path => ['/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/sbin:/bin'], | |
} | |
} | |
#extensionname should be the file to load in the ini, e.g. mongo.so | |
define pear::installpackage ( | |
$packagename = $title, | |
$packageversion, |
This file contains hidden or 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 pear::packages { | |
exec { 'pecl-mongodb' : | |
path => ['/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/sbin:/bin'], | |
} | |
} | |
#extensionname should be the file to load in the ini, e.g. mongo.so | |
define pear::installpackage ( | |
$packagename = $title, | |
$packageversion, |
This file contains hidden or 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
#extensionname should be the file to load in the ini, e.g. mongo.so | |
define pear::installpackage ( | |
$packagename = $title, | |
$packageversion, | |
$extensionname, | |
$execpath = ['/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/sbin','/bin'], | |
$execuser = 'root' | |
) { | |
exec { "${packagename}-${packageversion}": | |
command => "/usr/bin/pear install ${packagename}-$packageversion", |
This file contains hidden or 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
#extensionname should be the file to load in the ini, e.g. mongo.so | |
define pear::installpackage ( | |
$packagename = $title, | |
$packageversion, | |
$extensionname, | |
$execpath = ['/usr/local/sbin','/usr/local/bin','/usr/sbin','/usr/bin','/sbin','/bin'], | |
$execuser = 'root' | |
) { | |
exec { "${packagename}-${packageversion}": | |
command => "/usr/bin/pear install ${packagename}-$packageversion", |
This file contains hidden or 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
#wooo we're making a function | |
def convert_feet_to_meters(number_of_feet) | |
puts "You have #{number_of_feet} feet." | |
number_of_meters = number_of_feet * 0.3048 | |
puts "That's equal to #{number_of_meters} meters!" | |
end | |
convert_feet_to_meters(3) |
This file contains hidden or 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
##../modules/haproxy/init.pp | |
class haproxy { | |
include | |
'::haproxy::install', | |
'::haproxy::config', | |
'::haproxy::service' | |
Class['::haproxy::install'] -> Class['::haproxy::config'] | |
Class['::haproxy::config'] ~> Class['::haproxy::service'] | |
} |
This file contains hidden or 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
# configure haproxy | |
class haproxy::config ( $haproxycfg ) { | |
file { 'haproxy.cfg': | |
ensure => present, | |
content => $haproxycfg, | |
path => '/etc/haproxy/haproxy.cfg', | |
owner => root, | |
} | |
} |
This file contains hidden or 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
# Install and configure haproxy. | |
class haproxy ($haproxycfg) { | |
include | |
'::haproxy::install', | |
'::haproxy::config', | |
'::haproxy::service' | |
Class['::haproxy::install'] -> Class['::haproxy::config'] | |
Class['::haproxy::config'] ~> Class['::haproxy::service'] | |
} |
This file contains hidden or 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
# configure haproxy | |
class haproxy::config inherits ::haproxy { | |
file { 'haproxy.cfg': | |
ensure => present, | |
content => $haproxycfg, | |
path => '/etc/haproxy/haproxy.cfg', | |
owner => root, | |
} | |
} |