summaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: f2a51dcb7c581a29641b9554a7d5f892dc58bb74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Class: httpd
#
# This class installs Apache
#
# Parameters:
#
# Actions:
#   - Install Apache
#   - Manage Apache service
#
# Requires:
#
# Sample Usage:
#
class httpd {
  include httpd::params

  package { 'httpd':
    ensure => installed,
    name   => $httpd::params::apache_name,
  }

  service { 'httpd':
    ensure    => running,
    name      => $httpd::params::apache_name,
    enable    => true,
    subscribe => Package['httpd'],
  }

  file { 'httpd_vdir':
    ensure  => directory,
    path    => $httpd::params::vdir,
    recurse => true,
    purge   => true,
    notify  => Service['httpd'],
    require => Package['httpd'],
  }
}