Tag Info

Hot answers tagged

7

No, puppet can't update to latest minor, but can only ensure specific version, or can ensure package is present, or latest. What you should do is create your own custom repositories, which will have only packages of your relevance (for example 5.4 series of PHP) and then in puppet just set: package { 'php-fpm': ensure => latest } This will check every ...


6

We are using Hiera's YAML backend but I am sure the same is possible for JSON and others. You can just format you string the way you want it in YAML and Puppet will happily accept it. For example: --- hiera::input: | my string with newlines preserved Notice the | after the hiera::input key name. It tells the YAML parser that to treat the following ...


4

Single quotes prevent variables from getting expanded, so it should be like this: subscriptions => [ 'sensu-default', 'centosJenkinsMaster', $::fqdn, ], I'd recommend you to use puppet-lint. In that case it would have told you: ERROR: single quoted string containing a variable found on line X


3

When you declare the haproxy class you can require it, e.g.: class { 'haproxy': require => Apt::Source['debian_wheezy'], }


3

The designated tool that meets the described requirements is Beaker. It will allow the creation of acceptance test scenarios like the one that was sketched in the question.


3

After thinking about it on my commute, decided to check out SELinux and there it was: [root@foosat hiera]# grep yaml /var/log/audit/audit.log | head -n1 type=AVC msg=audit(1430926955.728:75727): avc: denied { getattr } for pid=17099 comm="ruby" path="/var/lib/hiera/users.yaml" dev="dm-2" ino=25185161 scontext=system_u:system_r:passenger_t:s0 ...


3

What you could use as a check if puppet master is working correctly is to set up some kind of API query, for example: curl -k -H "Accept: pson" https://puppetmaster:8140/production/status/no_key Offcourse, API access won't be available by default, meaning you will have to use the SSL certificates of a signed client to be able to access the REST API. Also, ...


3

I ran into this problem as well. The problem is most likely that puppet agent ran before starting puppetserver. The agent will create its key when it runs the first time, but not the CA that is required to run the server. To solve this on that existing VM, you will need to remove those keys: rm -rf /etc/puppetlabs/puppet/ssl/* And then start the ...


2

Sharing exported resources is problematic, because it requires mutual trust between the collecting master and the storing PuppetDB. For this you will need to share the Puppet CA, and this will blur the separation of the infrastructure. You might have better luck actually introducing additional agents on the monitoring infrastructure as well. These will ...


2

If you are using Puppet 3 or later, the best way to approach this would be to use hiera to perform automatic parameter lookup. In brief, it allows you to declare classes using the include syntax rather than the resource-style syntax, meaning that you can have multiple declarations for the class. Note that you cannot mix include and resource-style ...


2

The non-root account can just run puppet agent --one-time --no-daemonize and any other flavor of puppet agent. Configuration and persistent data will be looked up and stored in ~/.puppet/ for Puppet 3.x and older ~/.puppetlabs/ for Puppet 4.x and later Things you want to make sure via ~/.puppet/puppet.conf: you use a distinct certname setting for the ...


2

You can customise master log destination by editing : /etc/default/puppet (Ubuntu 12.04 LTS) Edit : /etc/init.d/puppet (Ubuntu 14.04 LTS) Add the following to DAEMON_OPTS : DAEMON_OPTS="--logdest=/var/log/puppet/master.log"


2

You basically declared postfix::server twice. Once by including it and again by declaring class { '::postfix::server':. The example does not mention the include, you should remove it. Also read: puppet labs


2

To use |, you must use the shell built in work around with cmd.exe /C: https://docs.puppetlabs.com/windows/troubleshooting.html#shell-builtins See example below: exec { 'configure_timezone': command => "tzutil.exe /s \"${timezone}\"", unless => "cmd.exe /C tzutil.exe /g | findstr /C:\"${timezone}\"", }


1

You achieve this effect through automatic parameter lookup. Your Hiera data targets the actual apache module, not your apache profile. apache::keepalive: true This only works if class apache has a $keepalive parameter. And yes, the default for this should be taken from apache::params. class apache($keepalive = $::apache::params::keepalive) inherits ...


1

I highly doubt many people use their CM agent as their primary system to manage services. Mostly configuration management is used to configure the your OS init system, and it uses the init system features to start/stop things.


1

In your first run (when you send the request for a new certificate) you could use the parameter --certname to give a specific name to every machine (also if they have the same hostname) So on the shell you could use: puppet agent -t --certname=myhostXX On the puppet server you'll see a new request with that name. Could this help in your environment ?


1

I don't get the requirement of "one host at a time". Puppet is perfectly capable of serving and recording multiple puppet agent runs at a time. Just to rule out that it's an environment issue, run sudo -i <command>. Anyway, using Puppet in push mode might be more fitting to your demands. The puppet agent (which you need to reconfigure first) will ...


1

If you want to impact on the last CATALINA_OPTS variable, you need to specify it: augeas {'test': lens => 'Properties.lns', incl => '/tmp/setenv.sh', changes => "set CATALINA_OPTS[last()] \" $CATALINA_OPTS -XX:PermSize=192m -XX:MaxPermSize=192m \"", } You could use [2] instead of [last()], but at least the latter one ensures ...


1

I was able to solve the problem by clearing the certs of all of the nodes out of the master,as well as the master cert and fulling deleting the SSL directory off the agent. I had cleared the agents before but it seemed clearing the master one was required as well.



Only top voted, non community-wiki answers of a minimum length are eligible