Skip to content

Instantly share code, notes, and snippets.

@rkhatibi
Forked from anonymous/gist:2511914
Created April 27, 2012 19:07
Show Gist options
  • Save rkhatibi/2511951 to your computer and use it in GitHub Desktop.
Save rkhatibi/2511951 to your computer and use it in GitHub Desktop.
apache::params:
class apache::params {
$vgname = 'vg01'
$lvname = 'wwwlv'
$lvsize = '2G'
$fstype = 'ext4'
$fsname = "/dev/${vgname}/${lvname}"
}
class apache::lvm {
include apache::params
logical_volume { "${apache::params::lvname}":
ensure => present,
volume_group => $apache::params::vgname,
size => $apache::params::lvsize,
}
filesystem { "${apache::params::fsname}":
ensure => present,
fs_type => $apache::params::fsytpe,
require => Logical_volume["${apache::params::lvname}"],
}
file { '/www':
ensure => 'directory'
}
mount { 'www':
require => [ File['/www'], Filesystem["${apache::params::fsname}"] ],
atboot => 'yes',
ensure => 'mounted',
device => "/dev/${apache::params::vgname}/${apache::params::lvname}",
fstype => $apache::params::fstype,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment