我是木偶世界的新手。我有 Ubuntu 11.04(64 位)服务器和客户端。我已经安装了最新版本的 puppet 服务器和客户端。Puppet 配置运行成功。我能够从我的客户端连接到服务器。
我想写一个食谱来在我的客户端上安装 Apache2。谁能告诉我在我的客户端上安装 Apache2 的木偶配方的链接或逐步创建过程?如何运行以及在哪里运行这些食谱?
我在哪里可以看到错误文件?我怎么知道我的食谱工作正常?
init.pp 文件是
file {"password":
name=>"/etc/passwd",
owner =>"root",
group =>"bin",
mode=>644,
}
class apache{
package { httpd: ensure => installed }
service{ "httpd" :
name => $operatingsystem ?{
debian=>"apache2",
redhat=>"httpd",
default =>"apache",
CentOS=>"httpd",
},
ensure=> running,
require=>Package["httpd"],
}
}
node 'myclientname'{
include apache
}
# All of the nodes that don't have definitions associated with the will use
# the following node definition.
node default {
case $operatingsystem {
CentOS: { include apache }
default: {}
}
}