Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Ruby by Paul ( 17 years ago )
define apache::vhost($ensure, $source='', $content='') {
  include apache

  if ($source != '') and ($content != '') {
    err("Cannot define both 'source' and 'content' for apache::vhost!")
  }

  File { notify => Service["apache"] }

  file {
    "${apache::sites_available}/${name}":
      source => $source ? {
        '' => undef,
        default => $source
      },
      content => $content ? {
        '' => undef,
        default => $content
      },
      ensure  => $ensure;
    "${apache::sites_enabled}/${name}":
      target => "${apache::sites_available}/${name}",
      ensure  => $ensure ? {
        enabled => symlink,
        default => $ensure
      }
  }
}

 

Revise this Paste

Your Name: Code Language: