Advertisement
varkanduku

Untitled

Oct 26th, 2015
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.88 KB | None | 0 0
  1. define apache::vhost($port, $document_root,$servername, $vhost_name='*', $vhost_dir){
  2.  
  3.                 File {
  4.                         mode            => 0677,
  5.                 }
  6.                 file { 'index':
  7.                         path            => "${document_root}/index.html",
  8.                         ensure          => file,
  9.                         content         => template('apache/index.html.erb'),
  10.                         before          => File['config_file'],
  11.                 }
  12.                 file { 'config_file':
  13.                         path            => "${vhost_dir}/${servername}.conf",
  14.                         ensure          => file,
  15.                         content         => template('apache/vhost.conf.erb'),
  16.                         require         => Package['apache'],
  17.                         notify          => Service['apache'],
  18.                 }
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement