Questions tagged [puppet]

Puppet is a configuration management tool (Unix & Windows) with its own Domain Specific Language.

Filter by
Sorted by
Tagged with
9 votes
2 answers
2k views

Installing open-vm-tools in Ubuntu via Puppet; what's the lesser evil?

In an ideal world, configuring puppet to install the open-vm-tools should be as simple as this: class vm-tools { package { 'open-vm-tools': ensure => installed } package { '...
Shane Madden's user avatar
8 votes
3 answers
7k views

How do I provide dpkg configuration parameters to aptitude or apt-get?

When installing gitolite I find that: # aptitude install gitolite The following NEW packages will be installed: gitolite 0 packages upgraded, 1 newly installed, 0 to remove and 29 not upgraded. ...
user avatar
8 votes
4 answers
10k views

What is the best way in Puppet to add a piece of text to the /etc/hosts file?

I would also like to keep the ability to manually edit hosts-file, at least the first 10 lines. #Public IP's - eth0 192.168.1.103 front-01 192.168.1.106 front-02 #Private IP's - eth1 192.169.40....
ujjain's user avatar
  • 4,033
8 votes
4 answers
19k views

How can I have puppet deploy ssh keys for virtual users?

I am trying to get puppet to assign authorized ssh keys for virtual users but I keep getting the following error: err: Could not retrieve catalog: Could not parse for environment production: Syntax ...
Pheezy's user avatar
  • 251
8 votes
5 answers
11k views

Puppet's automatically generated certificates failing

I am running a default configuration of Puppet on Debian Squeeze 6.0.4. The server's FQDN is master.example.com. The client's FQDN is client.example.com. I am able to contact the puppet master and ...
gparent's user avatar
  • 3,632
8 votes
2 answers
8k views

Installing package from PPA using Puppet

I'm trying to automatically provision VMs with docker pre-installed. My default init.pp looks like: class { 'apt': always_apt_update => true, } package { [ #'build-essential', #'vim',...
digital's user avatar
  • 345
7 votes
3 answers
9k views

Vagrant OS X host nfs share permissions error - Failed to set owner to '1000'

I am a Vagrant and Puppet newbie, I have created a Base Box with Debian Squeeze plus standalone Puppet, using the instructions here to install Puppet with the Puppetlabs packages. The box itself ...
rachelandrew's user avatar
7 votes
2 answers
3k views

Puppet configuration using augeas fails if combined with notify

I'm having a problem with the following Puppet manifest, which is meant to enable the passwdqc pam module on a RHEL-6 system (this is using Puppet 0.25.5 and augeas 0.7.2): augeas { 'authconfig': ...
larsks's user avatar
  • 44.9k
6 votes
2 answers
5k views

Puppet class inheritance confusion

I've read the documentation on scope, but I'm still having trouble working this out. I've got two environments that are very similar - so I've got: modules/django-env/manifests/init.pp class django-...
EMiller's user avatar
  • 205
6 votes
2 answers
9k views

Puppet&Hiera: $variable is not an hash or array when accessing it

I was using Puppet 3.2.2 and Hiera 1.2.1. And I wrote a puppet module and the content of init.pp was: class install( $common_instanceconfig = hiera_hash('common_instanceconfig'), $...
txworking's user avatar
  • 479
6 votes
3 answers
2k views

Can you unapply a puppet manifest action?

I've applied a puppet manifest, which in turn included a puppet module that added several entities to /opt/... Is there a way to undo the effects of an applied puppet module ? i.e. "puppet module ...
jayunit100's user avatar
6 votes
1 answer
200 views

Easily recreate a server's "state" [closed]

I want the ability to setup new servers for dev/testing/prod very easily. The reasons for being able to setup a new dev VM is obvious, but for prod my concern is adding a new production server/...
Brandon - Free Palestine's user avatar
6 votes
2 answers
2k views

Scripted install vs cloning

What are the downside of cloning vs scripted installation (using Kick-start / Puppet)? I read a lot of pro-scripted install opinion, where cloning is considered as unreliable method due to ever ...
SyRenity's user avatar
  • 3,189
5 votes
1 answer
2k views

Puppet agent using 100% CPU, on a single node for an hour

Puppet seems to peg the CPU when I try to do a recursive deploy of a directory into a folder that already has a substantial number of files. The the provider used by the user resource on my systems ...
Zoredache's user avatar
  • 132k
5 votes
3 answers
5k views

Can I use wildcards is puppet package ensure to cover multiple releaseversion

Using puppet I want to update packages on my (CentOS 5 & 6 servers) in a controlled way. Therefore I don't want to use ensure=>latest but rather ensure=>3.0.1-1. Example: class puppet::...
Rob van den Eijnde's user avatar
5 votes
2 answers
4k views

puppet: stop service before overwriting file

I got the following simplified configuration: file { '/etc/foo.conf': ensure => file, content => epp('my_module/etc/foo.conf.epp'), ; } service { 'foo': ensure => ...
skualito's user avatar
5 votes
2 answers
4k views

Overriding Parameters in Previously Declared Puppet Resource

I'm attempting to rebuild nwaller's sssd puppet module to be entirely LDAP based and to be a little cleaner. In it we have a resource defined for each authentication domain of the form define sssd::...
Scott Pack's user avatar
  • 14.9k
5 votes
1 answer
5k views

migrating puppet clients to a new puppet master (old puppet master server gone, only using backup)

My puppet master server had a hardware failure, and I have restored to another box. However this box has different hardware and hostname. If I restore the existing /etc/puppet directory to the new ...
Tom's user avatar
  • 11.3k
4 votes
2 answers
970 views

How can I tell Puppet "If I declare class X, apply its resources before class Y"?

In my Puppet configuration I want to say "If I declare class X, apply its resources before class Y." In other words, I want to declare an ordering, but remain silent about whether or not to apply ...
Matt McClure's user avatar
4 votes
1 answer
2k views

How to access the environment name in Puppetfile

I'm using R10K with Puppet. The Puppetfile is basically DSL: Because the Puppetfile format is actually implemented using a Ruby DSL any valid Ruby expression can be used. Ref: https://github....
ETL's user avatar
  • 6,613
4 votes
3 answers
21k views

Differences between local 'puppet apply' and 'puppet agent' to a puppetmaster

We're in the process of migrating away from a monolithic puppet repository that contains all of the config. This one repo contains things that really shouldn't be on every node ever, so a puppetmaster-...
sysadmin1138's user avatar
  • 134k
3 votes
3 answers
3k views

puppet cert mismatch in ec2

I'm setting up a puppetmaster (2.7.6) in ec2 via gems (on rhel6) and I'm running into problems with the cert names and getting the master able to talk to itself. my puppet.conf looks like this: [...
Stick's user avatar
  • 658
3 votes
2 answers
8k views

How to exclude Puppet modules for a few nodes?

I have 80 nodes, 78 need to have a specific module, except for 2. [root@puppetmaster puppet]# cat hiera.yaml :backends: - yaml :hierarchy: - environment/%{::environment}/%{::hostname} - ...
ujjain's user avatar
  • 4,033
3 votes
1 answer
6k views

How to define multiple /etc/hosts entries with Puppet ENC?

I'm writing an External Node Classifier for my Puppet infrastructure, and I have the need to manipulate the /etc/hosts file on each node. The following (due to the duplicate key) is invalid YAML: --- ...
Chris Tonkinson's user avatar
3 votes
1 answer
8k views

Making logrotate remove old logs after reducing 'rotate' value

I'm trying to reduce the number of log files kept for Apache by reducing 'rotate 52' in /etc/logrotate.d/apache2 to 'rotate 8'. With weekly rotation this should keep 2 months of logs instead of a full ...
Martijn Heemels's user avatar
3 votes
2 answers
1k views

How to ensure that the «if» statement gets parsed _before_ a given resource/class?

Sometimes there are complicated interactions between packages. To avoid class interface with countless, seemingly unrelated parameters, I though about using tags, defined(<resource>) function ...
Adam Ryczkowski's user avatar
3 votes
3 answers
5k views

Puppet - Any way to copy predefined custom configuration files for software on clients from the puppet master (host)?

I have been having a lot of fun coding with what puppet I have had experience with so far, and so far it looks like it can do most of what I need it to do. One thing I am not finding in the ...
Joshua Enfield's user avatar
3 votes
2 answers
4k views

How do I evaluate a class not on every puppet run?

I would like to have a method that only evaluates a particular class once a day at a specific time. Right now I am running my puppet agent from the cron, but I would like to change it to either run ...
Zoredache's user avatar
  • 132k
3 votes
2 answers
1k views

How to monitor package versions across multiple (Linux) servers

We use Puppet for installing the base level OS and packages, but our own application packages are deployed manually by individual developers. I'm looking for a web dashboard to view/monitor the ...
mrisher's user avatar
  • 401
3 votes
3 answers
19k views

puppet - using ensure with package 'version' and 'held'

Overview: Just started using Puppet and used the following array with 'ensure' so a specific version of Apache is installed (rather than the latest) and its 'held'(which means it won't be upgraded on ...
hokeycokey's user avatar
3 votes
3 answers
659 views

Puppet, setting dependencies

I am starting to setup puppet. I want to set up a dependencies that a mail transfer agent must be installed before that class tries to install or start anything. With puppet, the standard method ...
Zoredache's user avatar
  • 132k
3 votes
2 answers
4k views

Puppet apache module causing 'Error 400 on SERVER: Invalid parameter identifier'

I am receiving the following error when trying to use the latest puppetlabs-apache module from github (https://github.com/puppetlabs/puppetlabs-apache): Error: Could not retrieve catalog from remote ...
Andy Shinn's user avatar
  • 4,271
2 votes
2 answers
740 views

How to detect NVIDIA GPU with Puppet

I have some tasks I only want to run on machines that have NVIDIA GPUs. Is there a good way with Puppet to be able to determine if a specific agent has an NVIDIA GPU or not? I'm able to do it in bash ...
AndreasKralj's user avatar
2 votes
1 answer
4k views

Facter - custom fact, returns empty data set when invoked by Puppet agent

According to this puppet labs article, I can create custom facts from shell scripts. I have created a bash script that returns a single fact, it is packaged in a modules facts.d directory. The module ...
user3684494's user avatar
2 votes
1 answer
253 views

Avoid declaration of if regex statements while using Exported Resources in Puppet

Avoid to add a host manually class::define { [ 'host1.domain', 'host2.domain' ]: attribute => 'hello', attribute2 => 'world' } class::define { [ 'host3.domaintwo', ...
030's user avatar
  • 6,011
2 votes
2 answers
13k views

How to merge puppet array variables

Given the following puppet manifest, how can I merge / concatenate the two arrays such that the command will execute with both a=b and b=c ? Cron{ environment => ["a=b"] } class a{ cron{'test'...
François Beausoleil's user avatar
2 votes
2 answers
246 views

Puppet language configuration file editing

I am trying to create a puppet recipe for a log server and client using syslog-ng. I know I can have custom configuration files using template erb files and replace certain variables in the erb files. ...
chandank's user avatar
  • 867
2 votes
1 answer
206 views

Create users via Puppet by reading a mySQL table

For a particular service, users are added/removed via web to a mySQL table. I need to replicate those users on several ubuntu servers (as regular shell users), preferably through Puppet. Currently I ...
chris's user avatar
  • 292
2 votes
1 answer
2k views

Why does my namespace and class name conflict?

I have a puppet module installed that is called ntp. A node do I define by node testip { include myconfig::ntpp } and in /etc/puppet/modules/myconfig/manifests/init.pp have I class myconfig::ntpp {...
Sandra's user avatar
  • 10.6k
2 votes
0 answers
888 views

Puppet apache vhost automatic deployment

Hi there puppeters :), I hope you can help me with a situation. Namely, I will use puppet to deploy many (I mean really many) nodes with Apache installed. The problem I have is that for now the only ...
Danijel Krmar's user avatar
2 votes
2 answers
7k views

Puppet - how can I copy a file to several user folders?

Well I was using the info on this: Puppet - Any way to copy predefined custom configuration files for software on clients from the puppet master (host)? But I need some more elaborated, because I ...
Eliot Rocha's user avatar
2 votes
2 answers
511 views

Puppet parameter lookup

I would like to know if it is possible to lookup the value of another Puppet resource, something like the following example: define foo( $username ) { $home = User[$username].home .... } The ...
muksie's user avatar
  • 123
2 votes
4 answers
1k views

Can I use Puppet to find out what nodes do not have VMware tools installed?

I have 100 servers with RHEL that I would like to run VMware tools. I have written a Puppet-module that can install VMware tools, just using package {}: package { 'vmware-tools-esx-nox': ensure =&...
ujjain's user avatar
  • 4,033
2 votes
2 answers
8k views

Using hiera to access facts of another node

What we're trying to do is generate firewall rules (puppetlabs/firewall) for iptables. Our nodes are grouped like so conceptually: -- site1 ---- shared1 ------ specific1 ------ specific2 ---- shared2 ...
Josh Smeaton's user avatar
  • 1,360
2 votes
2 answers
5k views

How can I install packages from the RHEL6's Optional Channel via Kickstart?

I typically install puppet via kickstart. Apparently, puppet now requires a package (libselinux-ruby) that is included in the Red Hat's Optional Channel. I was under the impression I could only use ...
Belmin Fernandez's user avatar
1 vote
3 answers
10k views

Puppet: variable overriding best practices

I'm wondering what are best practices for overriding variables in puppet. I'd like to have all my nodes (which located in different places, some of them are qa, some live) with same classes. Now I ...
rvs's user avatar
  • 4,155
1 vote
1 answer
10k views

puppet could not evaluate: could not retrieve information from environment

puppet can do exec on node, but cannot transfer file from module. Ubuntu 14.04 server Puppet 3.8.4 Already tried: making file world readable disabling FW creating facter.d in module directory On ...
mzhaase's user avatar
  • 3,848
1 vote
3 answers
11k views

Appending a line to a file if it doesn't exist using Puppet

I've got a defined resource type to append a line to a file if it doesn't exist, as per below: define appendLineToFile($file, $line, $user) { exec { "echo \"\\n$line\" >> \"$file\"": ...
Chris's user avatar
  • 113
1 vote
3 answers
2k views

Puppet : resource already defined error

I am trying to create multiple directories and then copy files to each of the directories . For that I have created the following resource $dirs=myapp $appdirs = [ "/data/tomcat/$dirs/conf", "/data/...
Zama Ques's user avatar
  • 523
1 vote
1 answer
1k views

How to instantiate multiple instances of the same resource using Hiera

Using Hiera, is it possible to instantiate two classes with different properties? I know I can do add to my node declaration: user{'francois': uid => 1000, # ... } user{'julien': uid => ...
François Beausoleil's user avatar