Created
June 14, 2012 23:30
-
-
Save big-samantha/2933650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.6.1. The apache::install class | |
Firstly, we install Apache via the apache::install class: | |
class apache::install { | |
package { [ "apache2" ]: | |
ensure => present, | |
} | |
} | |
This class currently just installs Apache on an Ubuntu host; we could easily add an apache::params class in the style of our SSH module to support multiple platforms. | |
2.6.2. The apache::service class | |
For this module we're going to skip a configuration class, because we can just use the default Apache configuration. Let's move right to an apache::service class to manage the Apache service itself. | |
class apache::service { | |
service { "apache2": | |
ensure => running, | |
hasstatus => true, | |
hasrestart => true, | |
enable => true, | |
require => Class["apache::install"], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment