Questions tagged [puppet]

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

Filter by
Sorted by
Tagged with
5 votes
3 answers
28k views

Puppet & Facter - how to determine if running CentOS 6 or CentOS 5

How would you use facter and puppet to determine if the OS is running CentOS 6.x or CentOS 5.x ? facter operatingsystemrelease 6.4 I only care about the major release (6) I've thought about using ...
0 votes
0 answers
21 views

How to change the URL for Web UI Foreman?

Hi Can I change the url link for the web UI interface? I am using Foreman 3.9 versions. I try to change url with foreman-installer --foreman-url but I get error with ssl-certificate problem. Changing ...
0 votes
0 answers
16 views

Puppet not pulling in changes - Could not request certificate getaddrinfo: Name or service not known

I hope this is a simple fix and as background I have no experience with Puppet or Foreman. The set up: two puppet master nodes running on ec2 many other ec2 nodes running puppet modules foreman ...
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'...
0 votes
0 answers
63 views

Puppet agent certificate verify failure for new agents, but existing agents work fine (Puppet 7)

I have over 200 hosts presently working correctly against my puppet master (puppet agent -t applies a catalog). However, starting sometime recently I can no longer add new hosts. There have been no ...
0 votes
1 answer
9k views

Puppet agent run errors with `Could not run stack level too deep`

I have configured Puppet Server to use an external CA, and generated the necessary keys. My puppet.conf looks like the following: [master] vardir = /opt/puppetlabs/server/data/puppetserver logdir = /...
2 votes
3 answers
4k views

Require file for mount and also update the file after mount?

I am trying to make sure a directory exists for a mount and then also update the permissions of that directory after the mount happens. I am receiving the following error: err: Failed to apply ...
0 votes
1 answer
144 views

Puppet syntax issue when configuring a Prometheus scrape on an SNMP exporter

Some context I have an SNMP exporter running as a service on a server which allows me to access the data of some PDU using the following URL: http://my.host.name:9116/snmp?target=10.0.1.200&auth=...
0 votes
0 answers
46 views

Unable to autosign certificates for Puppet

I have a new Puppet server set up and am unable to currently get autosigning of certificates to work. I've followed the setup instructions on https://www.puppet.com/docs/puppet/7/config_file_autosign ...
0 votes
2 answers
376 views

Adding users to Unix groups only if said groups exist (puppet)

I tried using the 'group' attribute of the 'user' resource like so : user { "user": group => ["docker", "www-data"] } If the groups 'docker' and 'www-data' exist ...
0 votes
1 answer
69 views

Need help managing per-machine per-user sudo permissions in a research network environment using saz-sudo and Hiera with Puppet

Currently our Puppet server has an /etc/sudoers file defined with the permissions for every user on every machine in our network. This file is distributed equally to every host to provide permissions. ...
3 votes
2 answers
5k views

puppet Could not find dependency

I have inherited a puppet server. It has a couple of dozen hosts under management and it is mostly working fine. When I say mostly there are a few hosts that fail when checking in: Error: Failed to ...
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/...
0 votes
1 answer
92 views

How to fix puppet installation of ifupdown2 so that networking comes back up (or doesn't go down)?

I have puppet code which automatically installs ifupdown2 on newly provisioned physical servers (along with all other new host configuration). (This is Debian 11 Bullseye.) However, nearly all of the ...
1 vote
2 answers
2k views

puppet: fact in manifest with dot

I'm using puppet 4.10.9 with facter 3.6.8. I have a question(s) regarding the use of facts in a manifest that I'll ask in a simple form, and a more complex form. First, the simple question. On an ...
6 votes
3 answers
23k views

Check directory before creating file in puppet?

I'm trying to make a function which directory/file will be created only when the first directory exists, of not it must be skipped because of failed dependence. I've tried this "onlyif" workaround, ...
0 votes
1 answer
106 views

Puppet server can not sign certificate - FileSystemException: Operation not permitted

I have a pending puppet certificate: $ puppetserver ca list Requested Certificates: intern.mydomain.com (SHA256) 3C:82:85:ED:6C:30:54:79:7A:FC:41:00:63:33:E0:52:BE:AA:3B:3F:76:21:73:1E:0B:...
0 votes
0 answers
66 views

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[ksh] is already declared in file

I have an issue in setting up ksh installation on a module where it fails saying its already declared in another module. can someone assist me on how can I fix this? my code : on a module called ...
0 votes
0 answers
70 views

puppet 5.5 issue after renewed master certificate

I currently faced issue after renewing Puppet certificate. I did a clean backup of client SSL folder and did a puppet agent ‑t. Can anyone help me? This is the code. [root@pupcltlp0001 AEST /etc/...
7 votes
2 answers
4k views

puppet adding timestamp in file content

super new to puppet. Could not find good example of how to add timestamp in a file puppet.pp node '123' { file { '/tmp/hello': content => "hello world", } file { '/tmp/timestamped': ...
2 votes
0 answers
143 views

Puppet - Get interface name from netplan yaml config

How to get interface name which has nameservers defined? I want to get the interface name so I can pass it to another netplan puppet module so the nameservers can be replaced. But I only want to get ...
0 votes
1 answer
655 views

Puppet installation error

I am trying to install puppet enterprise for the first time, and following this documentation: https://puppet.com/docs/pe/2019.0/installing_pe.html I have downloaded the file and executed it locally ...
0 votes
0 answers
54 views

regex puppet query syntax

I'm trying to learn how to use puppet query, but I'm finding it difficult to target a particular fact path using regex. If I use the following query, I get exactly what I'm looking for: puppet-query '...
0 votes
0 answers
13 views

How to read the central Puppet Configurations in the Dockerfile

Currently, I am working on a project we are trying to containerize our application. As our current VMs build scripts are pulling the environment and application-related parameters via puppet file ...
69 votes
7 answers
43k views

automate dpkg-reconfigure tzdata

I'm using puppet to admin a cluster of debian servers. I need to change the timezone of each machine on the cluster. The proper debian way to do this is to use dpkg-reconfigure tzdata. But I can ...
-2 votes
1 answer
831 views

Can I specify operating system with a node definition in Puppet?

I want to do something along the lines of: Is this possible with Puppet? If not, what's the best way I can distinguish modules by operating system?
0 votes
0 answers
181 views

Continous delivery using Gitlab, Foreman and Puppet

We are using different tools to orchestrate our environment. On one side, we have Puppet and Foreman to deploy our different server applications, on the other side, we are using Gitlab in order to ...
0 votes
1 answer
4k views

Could not find terminus puppetdb for indirection facts

I'm attempting to install PuppetDB but I'm running into an issue when executing puppet -t. I'm getting: Error: Cached facts for puppet.asc.ohio-state.edu failed: Could not find terminus puppetdb for ...
1 vote
2 answers
22k views

Puppet: How to fix "Invalid resource type file_line"?

I have a freshly installed Puppet server with only one module configured and one managed client. This is a MOTD module and looks like so: class motd { file { "/etc/custom_motd.sh": path =&...
0 votes
1 answer
144 views

Puppet install: timeout when retrieving certificate

Trying to install the latest puppet enterprise (2023.0.0) per their guide on an Unbuntu 20.04 VM in Azure. I started with the out-of-the-box pe.conf. Install proceeds for awhile until I get some ...
2 votes
2 answers
1k views

DNF Enable/Disable in Puppet

I'm trying to get PHP 7.4 installed on my RHEL 8 system with Puppet, but can't get the package declaration right to disable php and enable php:7.4 with dnf. The Puppet Package documentation doesn't ...
0 votes
1 answer
139 views

Puppet errors with cron resource

I have this in my manifest: class security::sensor_apps::arkime (....) { ...... cron { "file_maintenance": command => "$home/db/db.pl http://secesprd01.its....
0 votes
1 answer
303 views

how to prevent puppet to override any change you made on the linux server?

i was trying to to change the timedatectl of one server from CST to EST. But everytime i made the change, puppet will override the change and bring it back to where it was after few minuite. How can i ...
18 votes
5 answers
34k views

Is it possible to get aws ec2 instance id based on its IP address

I have list of IP addressed, I want to find if instances associated with the IP address are still running or terminated. I am launching and terminating lot of instances on daily basis, just want to ...
1 vote
1 answer
525 views

Puppet: Issues with Vcsrepo (git) ".... exists and is not the desired repository."

I use puppet/Vcsrepo to distribute and update software to a bunch of linux servers from a Bitbucket(cloud) server. This worked fine for years but about 6 months ago Puppet started complaining about ...
1 vote
1 answer
316 views

Puppet Vcsrepo (git) : getting error "exists and is not the desired repository."

I am using vcsrepo with git to maintain a bunch of software on ubuntu systems. I use this bit of puppet code in a loop to keep the files up to date vcsrepo { "/usr/local/tools/$repo": ...
3 votes
3 answers
10k views

Working with arrays in puppet

I have a variable $IP = [ "91" , "92" ]and $IPPriveeInstance = "10.248.33.$IP". You guessed it, I want to use this variable 2 times,but when I print IPPriveeInstance, I got the output as 10.248.33....
1 vote
1 answer
1k views

How to pass multiple arrays in exec command resource in puppet?

I want to deploy certs in default keystore using Puppet I have two files root.crt and intermediateca.crt managed by puppet $alias=[rootca, intermediateca] $filecert= ["/var/lib/certs/rootca",...
0 votes
2 answers
149 views

puppetlabs-apache redirectmatch to 404 is not working

guys! I tried to return error 404 when accessing some directories on a vhost. Let's say we have http://bla.com/bla1, http://bla.com/bla2, http://bla.com/bla3, etc waiting to be redirected to 404. I ...
1 vote
1 answer
145 views

How to use puppet-apache mod (v8.3.0) with hiera?

Queston: Using the roles & profiles method, is it possible to use 'puppetlabs-apache', '8.3.0' with a hiera lookup? Context: I am using mod 'puppetlabs-apache', '8.3.0' to configure an apache ...
3 votes
3 answers
3k views

Puppet: Is it possible to remove multiple lines using file_line type?

In past times of the company I work for, someone configured many aliases and exports in /etc/profile. Since then we've implemented Puppet and there's a module which manages the application user ...
3 votes
2 answers
2k views

How to provision a node via puppet if it's using an image-based virtualization technology?

I'm trying to integrate puppet and vSphere via this module: https://forge.puppetlabs.com/puppetlabs/vsphere This module lets you create servers via a few lines of puppet code. I have a vm template ...
0 votes
1 answer
2k views

Could not evaluate: Could not retrieve information from environment bootmaster source(s)

Feeling like a complete newbie to puppet (I admit I am very rusty :-) So my manifest/site.pp file contains. file {"/tmp/findme.txt": source => "puppet:///modules/concat/concatfragments.rb" ...
1 vote
1 answer
2k views

external fact not available at very first puppet run

Introduction: We are using puppet to configure the nodes via a custom fact which is then referenced in hiera. The fact can either reside in the golden image in /etc/facter/fact.d/ or via pluginsync (...
18 votes
7 answers
28k views

How to add multiple dns names to my puppetmaster?

my puppet.conf on the master [master] certname = myname.mydomain.com ca_server = myname.mydomain.com certdnsnames = puppet;puppet.local;myname.dyndns.org;hivemind.local; for my understanding with ...
2 votes
1 answer
2k views

Puppet hang on 100% CPU usage

We're running puppet to manage our AWS instances and are migrating from a custom apt module for it, to the puppetlabs hosted apt module. Everything seems to work fine until during an puppet apply ...
110 votes
7 answers
28k views

How can the little guys effectively learn and use Puppet? [closed]

Six months ago, in our not-for-profit project we decided to start migrating our system management to a Puppet-controlled environment because we are expecting our number of servers to grow ...
1 vote
1 answer
2k views

Foreman errors out when provisioning using an ms-dhcp/dns smart proxy

Im running foreman, with smart-proxy on a win2k12 r2 box running ad/dhcp/dns. When i try to provision smart proxy dumps this to the logs: Changed the current scope context to 192.168.20.0 scope. ...
3 votes
1 answer
3k views

Puppet unable to send facts to Foreman - "tlsv1 alert unknown ca"

I recently updated Katello to 2.2 and Foreman now to 1.8.1, so it appears somewhere in the upgrade that Puppet now cannot contact Foreman: > [root@virt5 ~]# puppet agent --test info: > ...
1 vote
1 answer
3k views

generate ssh host keys for clients on puppetmaster

I look for a solution to create the ssh host keys for my puppet clients on the puppetmaster. I did some research and found http://jsosic.wordpress.com/2012/12/04/managing-ssh-host-keys-with-puppet/, ...

1
2 3 4 5
36