我是Puppet的新手,并按照本教程进入: http://www.pindi.us/blog/getting-started-puppet
我创建了一个SSH模块(/modules/ssh/manifests/init.pp),并在基本node.pp(puppet / manifests /)中添加了以下内容
node default {
include ssh
}
ssh模块loks ike this:
class ssh {
include ssh::install, ssh::config, ssh::service
}
class ssh::install {
package {"ssh":
ensure => present,
}
}
class ssh::config {
file { "/etc/ssh/sshd_config":
ensure => present,
owner => 'root',
group => 'root',
mode => 600,
source => "puppet:///modules/ssh/sshd_config",
notify => Class["ssh::service"],
}
}
class ssh::service {
service { "ssh":
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
}
}
Class["ssh::install"] -> Class["ssh::config"] -> Class["ssh::service"]
在木偶上我将模块路径链接到:
sudo puppet apply --modulepath=/vagrant/modules /vagrant/manifests/site.pp
有效。
如果我然后应用nodes.pp我得到错误:
Could not find class ssh for precise32 at /vagrant/manifests/nodes.pp:2 on node precise32...
一切看起来都合适,但我不知道我的错误在哪里。
之前我昨天在傀儡上安装了SSH,但我一定搞乱了