puppet:puppetDB和templatedir

时间:2016-01-02 07:08:34

标签: puppet

我安装了一些puppet服务器和puppetDB:

    [root@her code]# puppet master --version
    4.3.1
    [root@her code]# uname -a
    Linux her 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
    [root@her code]# cat /etc/centos-release
    CentOS Linux release 7.2.1511 (Core) 
    [root@her code]# rpm -qa | grep pupp
    puppetlabs-release-pc1-1.0.0-1.el7.noarch
    puppet-agent-1.3.2-1.el7.x86_64
    puppetserver-2.2.1-1.el7.noarch
    [root@her code]# puppet module list
    /etc/puppetlabs/code/environments/production/modules
    +-- puppetlabs-apt (v2.2.1)
    +-- puppetlabs-concat (v1.2.5)
    +-- puppetlabs-firewall (v1.7.2)
    +-- puppetlabs-inifile (v1.4.3)
    +-- puppetlabs-postgresql (v4.6.1)
    +-- puppetlabs-puppetdb (v5.0.0)
    L-- puppetlabs-stdlib (v4.10.0)
    /etc/puppetlabs/code/modules (no modules installed)
    /opt/puppetlabs/puppet/modules (no modules installed)

man 现在我有一些问题:

  1. 如何知道puppetDB的工作原理?我无法在'ps ax'输出中看到它,那没关系?

    [root@her code]# ps ax | grep pupp | grep -v grep
    23423 ?        Ssl    1:41 /usr/bin/java -Xms2g -Xmx2g -XX:MaxPermSize=256m -XX:OnOutOfMemoryError=kill -9 %p -Djava.security.egd=/dev/urandom -cp /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar clojure.main -m puppetlabs.trapperkeeper.main --config /etc/puppetlabs/puppetserver/conf.d -b /etc/puppetlabs/puppetserver/bootstrap.cfg
    
    [root@her code]# ps ax | grep sql | grep -v grep
    
  2. 我可以在哪里设置templatedir?在puppet 3.8中它是在/etc/puppet/puppet.conf中完成的,但是在这个版本中我不知道这个集合在哪里......

1 个答案:

答案 0 :(得分:0)

关于templatedir,这是Puppet 3.8中实际弃用的概念。它没有延续到Puppet 4.x

您想切换到directory environments,其中每个模块都有自己的模板藏匿处。在模块之外使用模板不是一个好习惯。