Puppet
準備 [#p8454ad9]
$ mkdir -p apache/template
$ cd apache
$ echo "Hello World!" > template/index.html
$ vim apache.pp
Manifest [#g707e120]
$packages = [
'httpd',
'httpd-devel',
]
package {$packages:
ensure => installed,
}
service {"httpd":
enable => true,
ensure => running,
hasrestart => true,
require => Package[$packages],
}
file {'/var/www/html/index.html':
ensure => present,
owner => 'apache',
group => 'apache',
mode => '0644',
content => template('index.html'),
require => Package[$packages],
}