Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2012 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/2511914 to your computer and use it in GitHub Desktop.
Save anonymous/2511914 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