簡體   English   中英

在Puppet Enterprise上配置Hiera

[英]Configuring Hiera on Puppet Enterprise

我是Puppet和Hiera的新手,嘗試將包含Hiera查找的模塊應用於代理時遇到配置問題。

從/etc/puppetlabs/puppet/hiera.yaml:

---
:backends:
  - yaml
:hierarchy:
  - defaults
  - "%{clientcert}"
  - "%{environment}"
  - global

:yaml:
  :datadir: '/etc/puppetlabs/puppet/hiera'

從/etc/puppetlabs/puppet/hiera/develop.yaml:

git_client:
    file_content:here

在運行Hiera進行調試時:

/ opt / puppet / bin / hiera git_client environment = develop -c /etc/puppetlabs/puppet/hiera.yaml --debug

DEBUG: 2015-05-12 12:40:27 -0400: Hiera YAML backend starting
DEBUG: 2015-05-12 12:40:27 -0400: Looking up git_client in YAML backend
DEBUG: 2015-05-12 12:40:27 -0400: Looking for data source defaults
DEBUG: 2015-05-12 12:40:27 -0400: Cannot find datafile /etc/puppetlabs/puppet/hiera/defaults.yaml, skipping
DEBUG: 2015-05-12 12:40:27 -0400: Looking for data source develop
DEBUG: 2015-05-12 12:40:27 -0400: Found git_client in develop
file_content:here

來自puppet.conf的Windows代理配置:

[main]
server=[REDACTED]
pluginsync=true
autoflush=true
archive_files=true
archive_file_server=[REDACTED]
graph=true
environment=develop

但是從Windows代理運行時:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item git_client in any Hiera data file and no default supplied at /etc/puppetlabs/puppet/environments/develop/modules/[REDACTED PATH TO .pp FILE]:24 on node [REDACTED]
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

我必須配置錯誤,但是我不確定在哪里。 任何幫助,將不勝感激。

為了使您的hiera配置更改生效,您需要確保重新啟動puppet master 如果您使用的是在JVM中運行的puppetserver ,請重新啟動pe-puppetserver服務。 如果您使用的是在passenger運行的舊ruby母版,請重新啟動pe-httpd

摘自hiera docs

人偶主文件注意:如果您在代理運行之間修改hiera.yaml,則必須重新啟動人偶主文件才能使更改生效。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM