Questions tagged [puppet]

Puppet is a ruby-based Configuration Management system incorporating a model-driven DSL. Its purpose is to provide configuration file enforcement, service state monitoring, package installation and other server-side management.

Puppet is a ruby-based Configuration Management system made by Puppet Labs.

Puppet has its own DSL, a model-driven language.

Its purpose is to provide configuration file enforcement, service state monitoring, package installation and other server-side management.

Functionality is provided by types. Out of the box, puppet comes with a number of commonly used types such as package, service and file.

It can be extended with modules available from the Forge.

Puppet is written in Ruby and licensed under the Apache v2 and the source code is avaliable on Github.

Useful Links:

See Also

4080 questions
6
votes
1 answer

How to pass two or more variables to Define in Puppet

I struck to pass multiple arguments in define. The following is my code. I would like to pass two array inside the define, But I'm able to pass only one as like the following. class test { $path = [$path1,$path2] $filename =…
ArunRaj
  • 1,780
  • 2
  • 26
  • 48
6
votes
2 answers

Puppet - Pass hash as class argument(s)

Trying to do something like this: # nodes.pp node 'dev-a-1.sn1.vpc1.example.com' inherits project_j1n_sn1_vpc1_dev { class { 'custom::core': overrides => { 'openssh' => {'settings' => {'external_access' => 'true'}}, # Allow…
Mike Purcell
  • 19,847
  • 10
  • 52
  • 89
6
votes
1 answer

Does Puppet Master-Client certificate ever expire?

During initial configuration of the Puppet agent, the agent obtains a security certificate signed by an authority recognized by the master -- most often the master itself -- with which it will subsequently identify itself to the master. Does this…
James
  • 193
  • 2
  • 4
  • 15
6
votes
1 answer

Notify in verbose or debug mode only

I'm looking for a way to display a notify { ... } message during puppet client run only when using puppet apply <--verbose | --debug> puppet agent <--verbose | --debug> I'd like to display debug messages when interactively/manually running…
ITL
  • 422
  • 1
  • 5
  • 17
6
votes
1 answer

Ordering of classes in puppet

I need to execute class mysql,tomcat before I execute code in class mypackage. In my site.pp I have node 'node1' { include mysql,mypackage,tomcat } How do I ensure the order of execution mysql->tomcat->mypackage I tried putting this in…
user1191140
  • 1,559
  • 3
  • 18
  • 37
6
votes
2 answers

How can I split my hiera config by role?

I'm using hiera to assign classes like webserver or dbserver to my nodes. The webserver class just includes apache and sets some config on it (e.g. port). Obviously I don't want to replicate this config for every node, so I put it in common.yaml.…
stripybadger
  • 4,539
  • 3
  • 19
  • 26
6
votes
0 answers

Using augeas with puppet to add an attribute to a root node

So I'm trying to do something that looks identical to the question at "Issues adding attribute to XML root node via augeas", but the answer provided there doesn't work for me. Without the insert command, I'm getting this error message (in puppet…
6
votes
4 answers

puppet: Could not back up : Got passed new contents for sum

I had a question I was hoping someone might have an answer to. Essentially what I'm doing is try to ensure I'm always using a fixed, slightly older version of phpunit, which I've placed in my module's file resources. The manifest: file { …
Arkandel
  • 339
  • 2
  • 10
6
votes
1 answer

Arithmetic operations inside templates

I'm trying to add a number to a parameter inside a puppet template as below "https://localhost:<%= 9443 + @offset %>/service/" This gives me the following error. Detail: String can't be coerced into Fixnum 'offset' is a numeric value. Is it…
Anuruddha
  • 3,187
  • 5
  • 31
  • 47
6
votes
1 answer

Puppet: stdlib installed but not available in namespace?

as a puppet newbie, I have a problem including the stdlib plugin I would like to use stdlib's file_line, thus I try to include stdlib and call it class service_mon { include stdlib file_line { "${name}_services": path=> ... …
THX
  • 553
  • 2
  • 8
  • 18
6
votes
1 answer

Does it ever make sense to ensure => file AND ensure => present in init.pp

Does it ever make sense to ensure a file is both present and file? Does present imply it's a file or does the file { '/etc/sendmail': line define it as a file? class sendmail { file { '/etc/sendmail': ensure => directory, mode =>…
mr.zog
  • 533
  • 1
  • 7
  • 26
6
votes
1 answer

How to enable PHP5 module using Puppet Apache2 module

I am using this Apache2 handling Puppet module https://forge.puppetlabs.com/puppetlabs/apache When I execute the following code, it successfully installs the virtual host, but it never enables the PHP5 module for Apache2. How do I enable it? class…
pkout
  • 6,430
  • 2
  • 45
  • 55
6
votes
1 answer

puppet apply error: Could not find default node or by name with 'uys0115' on node uys0115

I have installed puppet on two nodes, and the server node hostname is "uys0115", and the cient node hostname is "uys0119", and the server node have siged the client node. When I exec the commad: puppet cert list --all, we can see: + "uys0115"…
user3034702
  • 61
  • 1
  • 1
  • 3
6
votes
2 answers

Why do modules use classes in puppet (instead of defines)

I've been creating a couple of classes (in different modules) for puppet. Both, separately, require maven. So both classes have something like the following: class { "maven::maven": version => "3.0.5" } (using the…
stripybadger
  • 4,539
  • 3
  • 19
  • 26
6
votes
1 answer

Prompt user for input using boxen

I'm completely new to boxen (and puppet) and I want to prompt a user for a password during set up. I need to encrypt the input and add it to a config file. I'll be using a template to generate the file, but getting the password is a little tricky…
Ben Glasser
  • 3,216
  • 3
  • 24
  • 41