Puppet

Puppet

Puppet

foreman

centos安装没成功,感觉兼容性有问题,官方也没说完全支持

puppet

yum -y install puppet-server main里面配置autosign = true

hiera debug

hiera account::username –config /etc/puppet/hiera.yaml –debug

puppet faq

cert error dh key too small

https://blog.steve.fi/upgraded_my_first_host_to_buster.html

dh key too small

comment in /etc/ssl/openssl.conf

1
CipherString = DEFAULT@SECLEVEL=2

cert error Error: Could not request certificate: Error 400 on SERVER: The environment must be purely alphanumeric, not 'puppet-ca'

migrate from 3 to 5

具体请参考官方文档,3 to 5 官方文档 https://puppet.com/docs/puppet/5.5/upgrade_major_pre.html https://puppet.com/docs/puppet/5.5/upgrade_major_server.html

整个过程目前没想像的那么难受

install 5 repo

rpm -Uvh https://yum.puppet.com/puppet5/puppet5-release-el-7.noarch.rpm

1
yum -y install puppet-agent.x86_64

代码git的整个内容 放到/etc/puppetlabs/code/environments/production

Error: undefined method `index' for true:TrueClass

Error: /Stage[main]/Prometheus::Blackbox/Package[blackbox_exporter]/ensure: change from '0.21.0-1.el7' to true failed: undefined method `index' for true:TrueClass

表示ensure里面没有 puppet describe package找到ensure发现变了,没有true了

minds

<%= port > <% @port =>

file mode 0644 to '0644'

package ensure => 'latest' not true

Warning: /Stage[main]/Prometheus::Install/File[/etc/xxx]: Could not back up file of type directory

原因是文件夹里面有这个目录了,但是puppet不知道是否应该删除 add force => true to file declarations

Server Error: Syntax error at 'allow_virtual'

编写module的步骤

语法检查

1
puppet parser validate init.pp

nohup

1
2
- name: start simple http server in background
  shell: cd /tmp/www; nohup python -mSimpleHTTPServer </dev/null >/dev/null 2>&1 &

puppet修改主机名证书报错

1
2
3
4
rm -rf /opt/puppetlabs
yum -y remove puppet-agent
yum -y install puppet-agent
cp /etc/puppetlabs/puppet/puppet.conf.rpmsave /etc/puppetlabs/puppet/puppet.conf