Articles of 傀儡

Puppet文件资源:“父目录不存在”错误

我正在使用文件资源创build目录时出现以下错误 Error: Cannot create /data/tomcat/${dirsname}/conf; parent directory /data/tomcat/${dirsname} does not exist Error: /Stage[main]/App/File[/data/tomcat/${dirsname}/conf]/ensure: change from absent to directory failed: Cannot create /data/tomcat/${dirsname}/conf; parent directory /data/tomcat/${dirsname} does not exist` Error: Cannot create /data/tomcat/$dirsname/config; parent directory /data/tomcat/$dirsname does not exist Error: /Stage[main]/App/File[/data/tomcat/$dirsname/config]/ensure: change from absent to directory failed: Cannot create /data/tomcat/$dirsname/config; parent directory /data/tomcat/$dirsname does not exist` […]

无法连接木偶代理到主人

我想第一次设置傀儡 我已经确保使用ufw打开端口8140和22 。 服务器和代理都在运行。 在启动代理程序之前,我通过添加以下内容来编辑/etc/puppet/puppet.conf : [agent] server=174.89.xyz.abc 我也为/etc/puppetlabs/puppet/puppet.conf做了上面的,不知道我是否应该都有,当我运行puppet –version ,我回到4.10 。 代理服务器的IP被设置为主服务器的IP。 我运行puppet cert list希望看到代理的请求,我指出我的笔记本电脑,但我没有看到任何请求。 我不知道下一步该怎么做才能找出代理没有连接的原因。 编辑: 我跑puppet agent –test返回的testing: Info: Creating a new SSL key for ip-172-00-00-00.us-west-2.compute.internal Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known) Exiting; failed to retrieve certificate and waitforcert is […]

傀儡服务器多个SSL证书?

我将puppet服务器设置为docker-composition的一部分。 我有直接连接到容器的组成内的节点。 这可以正常工作,因为Puppet master使用本地名称自动创build一个SSL证书(只在docker组合中可用) ,其格式类似于: puppet.upgrades.jjk32jl.svc.dockerapp.io 我也有外部节点,这不是组成部分,需要通过外部链接upgrades.myorg.com连接。 当我尝试与外部节点连接时,我得到: 错误:无法请求证书:服务器主机名“puppet.upgrades.jjk32jl.svc.dockerapp.io”与服务器证书不匹配; 预计其中一个是upgrades.myorg.com,DNS:木偶,DNS:upgrades.myorg.com 我可以设置第二个用于处理外部节点的证书(或使用alt-name)来处理这种情况吗? 或者是否需要redirect节点之间的内部通信,以在upgrades.myorg.com从外部进行连接? 更新: 我已经添加了几个alt-name到我的主证书现在看起来像这样当我使用puppet cert -la : (SHA256)4B:A6:1F:C6:EA:8E:69:17:E3:43:C6:AE:A1:AE: BB:7B:9A:4F:09:5C:6F:92:BD:E7:C8:56:43:D8:03:12:59:58(alt名称:“DNS:puppet”,“DNS:puppet- 1.upgrades.fdafdafda.cont.dockerapp.io“,”DNS:puppet.c9039f55-d345-45d1-a8bd-8fec89481559.local.dockerapp.io“,”DNS:puppet.upgrades.jjk32jl.svc.dockerapp.io“ ) puppet.upgrades.jjk32jl.svc.dockerapp.io被列为alt-name,但我得到: 错误:无法请求证书:服务器主机名“puppet.upgrades.jjk32jl.svc.dockerapp.io”与服务器证书不匹配; 预计其中一个puppet.64b21c37-fa14-4406-b931-5add61cf582e.local.dockerapp.io,DNS:puppet,DNS:puppet.64b21c37-fa14-4406-b931-5add61cf582e.local.dockerapp.io 这是令人困惑的,因为puppet.64b21c37-fa14-4406-b931-5add61cf582e.local.dockerapp.io没有被提及作为主证书上的替代名称。

多个site.pp为相同的节点

我需要为同一主机编写多个site.pp文件。 它给了我以下错误 Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Node 'default' is already defined at line 2; cannot redefine at line 2 on node node-002.example.com 例如 : 我的第一个site.pp vi hosts-site.pp default{ } node "node-002.example.com" { ## Rules here to update /etc/hosts } 下一个Site.pp具有相同的节点但操作不同。 vi fstab-site.pp default{ } node "node-002.example.com" { […]

Puppet文件资源不parsing源属性

我已经开始玩木偶5,由于某种原因,puppet file资源中的source属性不起作用。 我有一个简单的清单文件在我的木偶服务器,如下所示: file {'/tmp/motd': source => '/tmp/motd', } 在代理上,我发出: puppet agent -t 其中的错误为: Error: /Stage[main]/Main/File[/tmp/motd]: Could not evaluate: Could not retrieve information from environment production source(s) file:/tmp/motd motd文件存在于/tmp/目录中的puppet服务器上 任何想法可能会发生在这里? 如果我用content => 'Testing 1 2 3'replacesource属性, puppet agent -t运行成功创build一个目录,我看到客户端上的文件motd与内容Testing 1 2 3

木偶 – MD5string的总和

我想命名一个基于某个字符的MD5总和的文件。 比如$ environment和$ URL。 所以从一个高层次,我想要的东西就像md5(“http:// $ environment / $ url”)。 有谁知道我怎么得到这种情况发生? 是否有像Crypt :: MD5这样的内置函数可以使用? 或者我应该为此写一个自定义函数?

puppet在所有服务器上执行远程脚本

我怎么能在所有木偶客户端上执行一个python脚本。 我已经添加了一个类来执行脚本 class curp { exec { "/usr/src/scripts/curp.py": } } 并将其包含在nodes.pp中 但是当我在远程客户端上执行,它说文件不能被发现? #client:# /usr/sbin/puppetd –test –server=puppetmasterserver notice: //chkconfig/Package[vsftpd]/ensure: created err: //curp/Exec[/usr/src/scripts/curp.py]/returns: change from notrun to 0 failed: Could not `find executable /usr/src/scripts/curp.py` 更多版本: 我已经通过创build文件服务器来修复了configuration文件, class curp { file { '/opt/files/curp.py': ensure => present, owner => 'root', group => 'root', mode => '0755', source => 'puppet:///modules/files/curp.py', […]

未能与木偶安装jenkins

我在一台Ubuntu机器上,当我没有安装jenkins傀儡与以下错误: /etc/puppet/modules/jenkins/manifests# puppet agent –no-daemonize –verbose notice: Starting Puppet client version 2.7.1 info: Caching catalog for fqdn.myhost.com err: Could not run Puppet configuration client: Parameter unless failed: 'apt-key list | grep -Fqe 'D50582E6'' is not qualified and no path was specified. Please qualify the command or specify a path. 而事实上我没有这个: /etc/puppet/modules/jenkins/manifests# apt-key list | grep […]

puppet macos x – > / usr / bin / puppet:3:在'require'中:不需要加载这样的文件

不能在mac osx 10.8上使用木偶,我可以在/ usr / bin / lib中find它,但是显示当我启动它时: /usr/bin/puppet:3:in `require': no such file to load — puppet/util/command_line (LoadError) from /usr/bin/puppet:3 任何想法 ? 编辑:我想用Vagrant虚拟机中的木偶做configuration是好方法吗?

有木偶和Centos 5.7的错误吗?

我正在通过木偶'学习'虚拟机。 这是我的清单: $ensure_val = 'present' define student($full_name) { user { "${title}": ensure => $ensure_val, comment => "${full_name}", groups => "student", home => "/home/${title}", name => "${title}", password => "${title}", shell => "/bin/bash", } } $students = { 'elion' => {full_name => "El Lion"}, 'azee' => {full_name => "Avery Zee"} } create_resources(student, $students) 当我做一个puppet apply manifest.pp […]