控制回购文件
forge "http://forge.puppetlabs.com"
# Modules from the Puppet Forge
# Versions should be updated to be the latest at the time you start
mod "puppetlabs/inifile", '1.5.0'
mod "puppetlabs/stdlib", '4.11.0'
mod "puppetlabs/concat", '2.1.0'
mod "puppetlabs/java", '1.6.0'
mod "puppet-selinux", '0.8.0'
mod "garethr-docker", '5.3.0'
# Modules from Git
# Examples: https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd#examples
#mod 'apache',
# :git => 'https://github.com/puppetlabs/puppetlabs-apache',
# :commit => '83401079053dca11d61945bd9beef9ecf7576cbf'
#mod 'apache',
# :git => 'https://github.com/puppetlabs/puppetlabs-apache',
# :branch => 'docs_experiment'
mod 'ssh',
:git => 'https://github.com/rajagennu/puppet-ssh.git',
:ref => 'master'
mod 'ntp',
:git => 'https://github.com/rajagennu/puppet-ntp_1.git',
:ref => 'master'
mod 'role',
:git => 'https://github.com/rajagennu/puppet-role.git',
:ref => 'development'
mod 'profile',
:git => 'https://github.com/rajagennu/puppet-profile.git',
:ref => 'development'配置文件在这里,https://github.com/rajagennu/puppet-profile/tree/development
码头配置文件代码如下所示
class profile::docker {
include ::docker
}角色在这里,https://github.com/rajagennu/puppet-role/tree/development
码头角色代码如下所示
class role::docker {
include profile::docker
}在所有的事情发生后,我跑了
puppet-code deploy --all --wait 在Puppet中,我创建了开发环境,并将生产添加为父环境,但我无法在类列表中找到role::docker或profile::docker。我也试过刷新,但没有帮助。
请找下面的截图作为参考

在傀儡服务器->开发环境中,我可以看到角色和配置文件中的docker.pp,以供参考。
[root@rgenupula1 puppetserver]# cd /etc/puppetlabs/code/environments/development/
[root@rgenupula1 development]# ls
environment.conf hieradata LICENSE manifests modules Puppetfile README.md scripts site
[root@rgenupula1 development]# cd modules/
[root@rgenupula1 modules]# ls
concat docker inifile java ntp profile role selinux ssh stdlib
[root@rgenupula1 modules]# cat profile/manifests/docker.pp
class profile::docker {
include ::docker
}
[root@rgenupula1 modules]# cat role/manifests/docker.pp
class role::docker {
include profile::docker
}
[root@rgenupula1 modules]#我不知道我在这里犯了什么错?请求你的帮助。我如何解决这种情况呢?
谢谢。
发布于 2017-10-23 17:37:17
在您的environment.conf环境中修改development并按如下所示更新模块路径
modulepath = /etc/puppetlabs/code/environments/development/modules:$basemodulepath然后重新启动傀儡服务器。
我的问题解决了。
https://stackoverflow.com/questions/46865855
复制相似问题