我在Ubuntu的,这是正确的方式让木偶开始重新启动? update-rc.d puppet默认 如果是的话,我在哪里可以看到该命令的结果? 它是否更新重新启动时调用的文件? 对于puppet master服务器和puppet代理服务器,这个过程是一样的吗? 更新只是为了防止puppet代理程序在ubuntu上使用默认安装重新启动后运行: sudo apt-get puppet facter 我怎么知道是否已经设置为重新启动?
系统pipe理员存在于所有环境的sudoers文件中,但是其他sudoers不是。 不同的环境都有略微不同的sudoers。 大多数情况下,90%的用户是相同的,10%是不同的,所以我们不能只有一个sudoers文件的一切。 目前,我们正在使用10个不同文件的木偶,如sudoers.production1,sudoers.production2,sudoers.production3,sudoers.testing1,sudoers.staging1等等。 然后Puppet根据服务器的$ domain(例如:dbserver.staging1.acme.com)或$ hardwaremodel选取要部署的文件。 它工作正常,但这是一个噩梦来维护这么多的文件。 我想基于服务器的域自动生成sudoers文件,并且只有一个大文件,所有用户和所有环境都具有sudoers权限。 东西看起来像: User_Alias ADMINS = abe, bob, carol, dave case $domain { "staging1.acme.com" { #add dev1,dev2,tester1,tester2 to sudoers file } "testing2.acme.com" { #add tester1, tester3, tester4 to sudoers file } 最好的办法是什么呢? 欢迎提出替代scheme。 我会很感激任何提示。 更新1: 出于安全原因,我们宁愿不连接位于puppet客户端的文件夹中的一堆文件,以防有人将文件放在那里(恶意或不合法),或者中断合并的文件或插入某些文件。 最重要的是,为了可用性,我们希望在puppet服务器上保留sudoers相关的文件(片段或完整)的数量为3(prod / stage / test),或者最好是1个文件。 这个文件将(以某种方式)在puppet服务器上生成sudoers文件,并向每个puppet客户端发送一个定制文件。 这样做的目的只是在一个文件中search一个用户名,并且比在11个文件上更快地删除它。 当把一个用户添加到一堆环境中时,它不会那么快,但是只需打开一个文件就可以看到,大大减less了遗漏的可能性。 我们的Sudo版本是1.6.9p8,所以我们不能使用/sudoers.d文件夹,只有sudoers文件。 UPDATE2: 我一直在search一些,我刚刚发现了这个,我花了一个小时在看: https://github.com/saz/puppet-sudo#readme […]
是否有办法(a)接受对类或资源定义的任意参数,然后(b)将这些parameter passing给另一个类或资源定义? 我经常发现我写的是一个本地types或第三方模块的薄包装。 例如: define myconfigfile { file { "/path/to/$name": owner => lars, group => lars, … } } 也就是说, myconfigfile是一组具有已知前缀的文件资源的有效缩写。 我实际上喜欢myconfigfile接受与file资源types(如content , source等)相同的参数,但我想避免: define myconfigfile ( $content = undef, $source = undef ) { … } 当只有一个或两个参数时,这可以正常工作,但如果我试图用大量的参数来包装一个参数化的类,它变得难以pipe理。
我试图使用puppetdb,但我遇到了一些问题。 我有一个名为puppet的节点。 这是主人,以及我已经安装了puppetdb。 这也是木偶pipe理的一个节点。 当我在傀儡节点上运行puppet -t时,我得到: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for puppet.example.com: Failed to submit 'replace facts' command for puppet.example.com to PuppetDB at puppet:8081: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to […]
如何在inheritance节点默认的情况下使用参数包含模块。 可能吗? 现在,我已经删除了“inheritance默认值”,并将其更改为node server123 { //include that //include this } 。 但是,每当我对默认进行更改时,我将不得不对节点server123进行相同的更改。 我不知道是否应该改变ntp模块来解决这个问题? 文件: manifest/nodes.pp node default { include ssh include ntp ruby::install { "1.2.3-456": } nagios { "1.2.3-456": } } node 'server123' inherits default { class { 'ntp': ntpserver => 'true' } -> duplicate class defined error. ## I want to define "$ntpserver = […]
我似乎无法得到这个工作。 我想让puppet发送一个日志消息,当文件发生变化的时候,就会在报告中显示出来。 这听起来很简单,但是没有任何作用。 这是init.pp文件: # sudo init.pp # 21 Sep 2011: Changed to test for notification only class sudo { package { 'sudo': ensure => present, before => File['/etc/sudoers'], } file { '/etc/sudoers': ensure => file, mode => 440, owner => root, group => root, source => 'puppet:///modules/sudo/sudoers', replace => false, audit => content, } […]
综上所述: 客户端首次连接并请求证书; 在主人puppetca -s client , puppetca -s client被执行; 客户端获得证书并成功完成运行。 精细。 但现在: 在puppetca -c client上, puppetca -c client被执行,客户端证书不在证书列表中; 客户端再次连接,并可以照常执行运行; 重新启动puppetmasterd不能解决问题。 一旦证书被撤销,我怎样才能防止客户端连接? 提前致谢
我想要位于/etc/puppet/files/key.pgp服务器文件 file { "/var/www/key.gpg": ensure => present, source => 'puppet:///files/key.gpg', } 我得到这个错误: Not authorized to call find on /file_metadata/files/key.gpg auth.conf :(我明白这应该匹配file* ) path /file allow * fileserver.conf: [files] path /etc/puppet/files allow * 难道我做错了什么? 我正在使用图书pipe理员来pipe理我的模块,所以我不想把任何configuration特定于模块目录。
我在/etc/puppet/modules/autofs/manifests/mount.pp(来自https://forge.puppetlabs.com/pdxcat/autofs上的pdx-cat / autofs模块)中有一个已定义的资源。 我在/etc/puppet/modules/sheffield/manifests/autofs/net.pp中有一个模块,它试图使用autofs :: mount定义的types。 class sheffield::autofs::net { include ::autofs autofs::mount { '/net': map => '', options => '-hosts', } } 但是,当客户端试图抓取目录,我得到以下错误; Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type autofs::mount at /etc/puppet/modules/sheffield/manifests/autofs/net.pp:7 on node rhel6test.shef.ac.uk 有任何想法吗? 我想也许这是不是自动加载types的问题,因为它具有相同的名称(autofs)作为sheffield :: autofs中的一个子类,所以我尝试重命名sheffield :: auto-fs并没有什么区别。 […]
我使用Puppet不时设置虚拟机。 有时我在这些虚拟机上运行Linux Mint。 我有很多我喜欢使用的Puppet模块,但是当他们检查LSB事实时,他们从奇怪的Linux Mint版本中退缩。 例如,我正在使用官方的Puppet Labs Java模块来安装JDK等。 params.pp文件看起来像这样(我已经删除了很多): class java::params { case $::osfamily { 'RedHat': {…} 'Debian': { case $::lsbdistcodename { default: { fail("unsupported release ${::lsbdistcodename}") } 'lenny', 'squeeze', 'lucid', 'natty': { $java = { 'jdk' => { 'package' => 'openjdk-6-jdk'… }, 'jre' => { 'package' => 'openjdk-6-jre-headless… }, } } 'wheezy', 'jessie', 'precise','quantal','raring','saucy', […]