Articles of 傀儡

不能使用npm作为木偶的提供者

我正试图在傀儡中做以下事情: package { 'bower': ensure => present, provider => 'npm', require => Class['nodejs'], before => [ Exec['npm_install'], Exec['grunt_build'] ], } 这给了我错误: err: Failed to apply catalog: Parameter provider failed on Package[bower]: Invalid package provider 'npm' at 我曾尝试使用puppetlabs-nodejs和willdurand-nodejs没有成功,也手动安装npm然后试图应用上述。

错误:重复声明虚拟定义用户和组平等的名称

我需要用名称user1和组user1来创build一个用户。 我定义了一个虚拟资源来创build它。 在class1中创build用户: include '::class1::virtual_accounts' realize(class::User['user1']) 在class2里面,创build组: include '::class1::virtual_accounts' realize(class::Group['user1']) 在virtual_accounts里面: class class1::virtual_accounts { @class::group { 'user1': } @class::user { 'user1': } 当执行出现错误: Error: Duplicate declaration: Group[user1] is already declared in file /root/puppet/class/manifests/group.pp:23; cannot redeclare at /root/puppet/class/manifests/user.pp:95 on node arqopasr21.lacaixa.es 在user.pp&group.pp里面我定义了创build用户和组。 这可能是错误已经生成,因为虚拟资源有相同的名称(user1)谢谢

木偶大师没有得到代理的证书请求

我有一个傀儡大师服务器和四个傀儡代理客户端。 在这里,我将我的puppet.conf文件和主机连接到所有节点。 当我打电话给“木偶证书列表”时,它什么也不返回。 但是,使用–all标志调用时,它会返回自己的证书。 我能够从所有的代理平傀儡,傀儡大师。 “傀儡代理 – testing”代理给出以下内容,退出; 没有find证书,waitforcert被禁用 我怎样才能从代理获取证书请求来掌握? 任何人都可以给我一个解决这个问题? [1] puppet.conf https://drive.google.com/file/d/0ByrsDKrxH15uaThvQm9VRHBtaTg/view?usp=sharing [2]主机https://drive.google.com/file/d/0ByrsDKrxH15uVktSYmhDN1NHaGc/view?usp=sharing

木偶目录树从一个variables创build

我试图使用puppet创build目录树。 Ex dir => / home / any_dirname / any_dirname2 / any_dirname3 / 有没有可能在puppet中创build上面的树,dirname可以是任何东西,所以我把它当作一个variables。 我如何拆分variables并确保每个目录都被创build?

木偶企业安装问题在CENTOS中

木偶企业CENTOS7(Vmware)上的安装问题 在运行单片安装时遇到以下问题: "Error: Could not start Service[pe-puppetserver]: Execution of '/bin/systemctl start pe-puppetserver' returned 1: Job for pe-puppetserver.service failed. See 'systemctl status pe-puppetserver.service' and 'journalctl -xn' for details. Error: /Stage[main]/Puppetenterprise::Master::Puppetserver/Service[pe-puppetserver]/ensure: change from stopped to running failed: Could not start Service[pe-puppetserver]: Execution of '/bin/systemctl start pe-puppetserver' returned 1: Job for pe-puppetserver.service failed. See 'systemctl status pe-puppetserver.service' and […]

从特定variables/ fact / hiera-value加载hiera文件

我正在试图根据一个特定的标志加载一个hiera文件。 Hiera hierarachyconfiguration是 :hierarchy: – "%{environment}/%{::fqdn}" – "%{environment}/%{nodetype}" – "%{environment}/%{calling_module}" – "%{environment}" – "common/%{calling_module}" – "common" 事实上,想要在“节点types”级别上分解一些configuration。 目标是避免在文件中放置相同的hiera“块”: 环境/testing/ myhost1.example.com.yaml 环境/testing/ myhost2.example.com.yaml 环境/testing/ myhost3.example.com.yaml 但相反,但共同的部分在: environment / test / nfs-server.yaml为所有与nfs服务器相关的常用configuration 环境/testing/后端服务器.yaml所有后端服务器相关的共同点 之后,所有的服务器都会通过fqdn yaml文件获得自己的特定值。 (这部分是确定的) 目前,我不知道如何将“nodetype”数据提供给hiera上下文。 我试图把它放在主要的清单文件中(是​​的,我读了文档,我知道这是一个坏主意,但即使绝望的尝试,它不工作) node 'nfs1.example.com', 'nfs2.example.com' { $nodetype= 'nfs-server' 但文件environment / test / nfs-server.yaml不是由hiera加载的。 我也尝试使用自定义事实,但使用自定义的事实 modules/hosts/facts.d/host-fact-test.txt 文件发送到代理的主机,但在这里,hiera不使用专用文件。 Notice: /File[/var/lib/puppet/facts.d/host-fact-test.txt]/ensure: defined content as […]

当Foreman在OpenStack中创build虚拟机时,在Foreman中复制主机logging

我设法连接Foreman和OpenStack,以便我可以使用Foreman Web界面在OpenStack中创build虚拟机。 我正在使用cloud-init或Foreman如何调用用户数据configuration模板来configuration新创build的实例。 为了testing目的,我正在使用这个云configuration脚本: #cloud-config: users: – name: danil groups: sudo shell: /bin/bash sudo: ['ALL=(ALL) NOPASSWD:ALL'] chpasswd: list: | danil:<hidden> root:<hidden> expire: False runcmd: – apt-get install -y puppet – sed -i -e 's/\[main\]/\[main\]\nserver=foreman.domain.com/' /etc/puppet/puppet.conf – puppet agent –test – puppet agent –enable – puppet agent –test 我正在添加一个新的主机,在虚拟机启动后,我可以看到它是一个名为new-host.domain.com的主机,型号名称为OST2,这是我在Foreman中用于OpenStack计算资源的名称。 在该主机内部,我可以执行一些基本的任务,例如closuresVM,删除它等等。 云configuration脚本完成它的工作,即它安装木偶,并通过Foreman智能代理由puppetpipe理这个虚拟机。 只要puppet完成主机初始化,我会看到名为“new-host”的重复主机。 在那个重复的主机的情况下,它有型号名称“OpenStack Nova”。 它可以通过puppet来pipe理,但是没有任何可用于new-host.domain.com的OpenStack任务在那里。 换句话说,我有两个相同的主机logging。 […]

木偶缺less弃用警告

我正在运行一个我用来configuration虚拟机的Puppet 3.4.3 master。 我注意到,当使用服务器作为主服务器时,在本地configuration时缺less很多的弃用警告。 (例如,没有findhiera文件,正在使用默认值) 使用debugging或详细的选项也没有帮助。 奇怪的是,我发现了一些关于主系统日志中apt模块中不推荐使用的variables名的警告。 然而,其他有关在rubyvariables名前面缺less“@”符号的警告却无处可寻。 我试着提高master的puppet.conf中的日志级别进行debugging,但没有任何改变。 我错过了什么? configuration打印: agent_catalog_run_lockfile = /var/lib/puppet/state/agent_catalog_run.lock agent_disabled_lockfile = /var/lib/puppet/state/agent_disabled.lock allow_duplicate_certs = false allow_variables_with_dashes = false archive_file_server = puppet archive_files = false async_storeconfigs = false autoflush = true autosign = /etc/puppet/autosign.conf binder = false binder_config = bucketdir = /var/lib/puppet/bucket ca = true ca_port = 8140 ca_server = puppet […]

获得puppetlabs-apt模块apt :: ppa在puppet hiera中工作

我在puppet 3.8.5中使用puppetlabs-apt伪造模块和hiera。 添加apt :: sources的作品: apt::sources: 'ubuntu': location: 'http://server.com/ubuntu' release: "%{::lsbdistcodename}" repos: 'main restricted universe multiverse' …但到目前为止,我还没有能够找出如何添加apt :: ppa's到hiera yaml。 我努力了: apt::ppa: 'ppa:webupd8team/java': ensure: 'present' …和: apt::ppa:'ppa:webupd8team/java'::ensure: 'present' …但没有运气。 其他人有这个工作吗?

试图在Centos上安装puppet 3.8

我正试图安装一个老版本的木偶, 1)我安装了puppet-devel回购2)我做了百胜更新,然后运行百胜安装puppet –skip-broken我得到以下错误: Packages skipped because of dependency problems: 1:facter-2.0.1-0.1rc4.el6.x86_64 from puppetlabs-devel hiera-1.3.2-0.1rc2.el6.noarch from puppetlabs-devel libselinux-ruby-2.2.2-6.el7.x86_64 from base puppet-3.6.0-0.1rc1.el6.noarch from puppetlabs-devel ruby-2.0.0.598-25.el7_1.x86_64 from base 所以我设法安装了大部分的依赖关系,但是在尝试安装puppet时仍然有错误: repository 'puppetlabs-devel': Error parsing config: Error parsing "baseurl = 'https://yum.puppetlabs.com/<%= @dist.downcase -%>/<%= @codename -%>/devel/x86_64'": URL must be http, ftp, file or https not "" …..我篡改了回购,所以我会把回购输出在这里: [root@localhost bin]# cat /etc/yum.repos.d/puppetlabs-devel.repo [puppetlabs-devel] […]