2017-10-21 179 views
0

控制回購木偶:無法找到木偶控制檯

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' 

檔案的Puppetfile作用就在這裏 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 

在我創建的開發環境木偶控制檯和添加生產作爲母公司的環境,但我無法找到role::dockerprofile::docker在班級列表中。我也試過刷新,但沒有幫助。

請從下面的截圖作爲參考

enter image description here

而在木偶服務器 - >開發環境,我可以看到角色和型材docker.pp,僅供參考

[roo[email protected] puppetserver]# cd /etc/puppetlabs/code/environments/development/ 
[[email protected] development]# ls 
environment.conf hieradata LICENSE manifests modules Puppetfile README.md scripts site 
[[email protected] development]# cd modules/ 
[[email protected] modules]# ls 
concat docker inifile java ntp profile role selinux ssh stdlib 
[[email protected] modules]# cat profile/manifests/docker.pp 
class profile::docker { 
    include ::docker 
} 
[[email protected] modules]# cat role/manifests/docker.pp 
class role::docker { 
    include profile::docker 
} 
[[email protected] modules]# 

我不是確定我在這裏犯了什麼錯誤?請求你的幫助。 而我該如何解決這些情況呢?

謝謝。

回答

0

修改environment.confdevelopment環境和更新ModulePath進行如下

modulepath = /etc/puppetlabs/code/environments/development/modules:$basemodulepath 

,然後重新啓動puppetserver。

我的問題得到解決。