Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [puppet]

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

0
votes
0answers
5 views

Is there a better way to execute specific manifests for specific operating systems with Puppet?

I'm using Puppet 4.10.12, and I'm currently writing a manifest for CentOS machines. I have the following way to execute it, the file is called centos.pp and the top of it is as follows: I feel there ...
0
votes
0answers
3 views

How to use custom facts with rspec Puppet

Is there a way I can use a custom fact while using rspec? My module works fine and the custom fact exists and works as intended when I do a puppet run on my agent, but when I try to use the same fact ...
0
votes
0answers
7 views

Installing FreeIPA with Puppet unmanaged failing

Currently, I'm trying to use a Puppet module to install the FreeIPA client, and I'm getting an error with it. I resolved the errors I had about the class structure, and right now my class is as ...
0
votes
0answers
7 views

Workaround to no `puppet module generate`?

Is there a way to continue using puppet module generate? I'm using Puppet version 4.10 and earlier I was able to make one without issue, but today when I tried to make one I got the following error: ...
0
votes
1answer
21 views

Puppet — if condition according to current status of machine

I am trying to write an if clause to do something according to the current status of a machine. I understand according to puppet's philosophy catalogs evaluate and push to the machines before they run ...
2
votes
1answer
50 views

Puppet: Replacing create_resources() with hash iteration

We're migrating from Puppet 2 to 5. It seems the scoping is a little different. Before, when using create_resources() with a hiera_hash and a default hash, variables from within the calling script ...
1
vote
0answers
15 views

Puppet server - Is it OK to delete files inside /var/lib/pgsql/data/base/?

We have a puppet server running 3.8.7 on RHEL 6.10. It experienced an OOM event this morning then the server recovered without intervention. While looking into this I noticed the server became very ...
1
vote
1answer
14 views

Client setting for FreeIPA Puppet module not working

I'm trying to use the FreeIPA Puppet module, and I copied the below module, changing the data to reflect my environment. class {'freeipa': ipa_role => 'client', domain ...
2
votes
2answers
36 views

Puppet 2 file resources in the same manifest

here is my manifest, also apologies for the formatting. At the very bottom is the error. How can I refactor this so that it works? I know its telling me that /etc/yum.repos.d is used more than once ...
0
votes
1answer
21 views

How to get the Zabbix Puppet module to work with SELinux

I'm writing a Puppet module to install Zabbix onto a Puppet agent. Everything is working as intended, but SELinux isn't playing nicely with Zabbix. I'm getting the following error from SELinux in the ...
0
votes
0answers
16 views

'puppet facts' returns almost nothing on master node but works fine on all other nodes

I have a lab setup consisting of 4 nodes, puppet master puppetdb server (puppetdb process & PostgreSQL on same node) 2 'member' servers # puppet facts on the master returns the following { "...
0
votes
1answer
40 views

puppet client side set variable if file exists on client machine

novice question here. I know it is similar to others here but i am not finding i can apply those answers in my case i have 2 servers that are blades and 2 that are regular rack mount servers. a ...
1
vote
1answer
19 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 ...
1
vote
1answer
16 views

How can I store the output of a Linux command in a Puppet file?

I want to create a new file on a specific Puppet agent and store the output of a Linux command to the file. Is there an easy way to do this with the content attribute? The command I want to run is ...
0
votes
1answer
17 views

puppet best practices: share variables among profiles

I'm using the roles&profiles approach for my current puppet project. The puppet best practices tell me: Expose all necessary profile parameters in the main class parameter list. Perform hiera ...
0
votes
0answers
13 views

Delete a file if it is empty using puppet

i want to delete a file "/root/abc" after ensuring if /root/abc file is empty. file { '/root/abc' : ensure => absent, content => '', } But this is not working.. can anybody help me in this ?
0
votes
0answers
6 views

Retrieve the list of nodes using a specific module

I currently have a huge list of nodes, some of them are running puppet, some of them are not. I need to know which are on puppet and whether they include a module or not. I would like to know how to ...
1
vote
2answers
21 views

Puppet: Run in noop mode except for the first time

I am trying to figure out how to run a Puppet configuration on a newly bootstrapped node, and then, from then onwards, only run as noop in order to collect reports on infrastructure changes / drifts. ...
0
votes
1answer
50 views

Get a daily digest of Puppet state change

I am currently learning to use Puppet v.6 in a master-agent configuration (I am using the open-source version). I come from Ansible and SaltStack background, so although some concepts are familiar, ...
0
votes
1answer
32 views

Why manifest file is not available in my puppet master

I'm very new with puppet. For initial setup, I have configured puppet master and agent in my Ubuntu 18.04. The configuration has been completed and I can see cert has been exchanged between master ...
-1
votes
2answers
113 views

Does puppet master and agent must have same os version

Do Puppet master and agent system have same OS Version? For example: My Puppet Master version is ubuntu: 18 Whereas Puppet agent version is ubuntu: 16
0
votes
1answer
23 views

create textfile in puppet from hiera list

I have a hash with a list in hiera. I use this to automatically create the dbs in the RDBMS via create_resources dbs: - dbname: something - dbname: or - dbname: other I would like to use this ...
0
votes
2answers
37 views

Puppet - how to use different file source

I create configuration in Puppet for Nagios agent (NRPE). Now I'm trying to set different file source depending on existence of dirs.First I check if specific directory exists and then set specific ...
0
votes
1answer
13 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 ...
2
votes
1answer
23 views

Understanding puppet JMX metrics

Ive been looking into JMX metrics being exported from puppet and am not clear on how to interpret them. This particular one is supposed to be measuring the package compiler but it's not clear (to me) ...
1
vote
1answer
29 views

Puppet over WAN to implement configuration changes to linux clients

As the title suggests, I need to find a way to implement a system that can change configuration to over 800 linux clients, for a client. The problem stems from the fact that we are not allowed to ...
0
votes
0answers
63 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
1answer
29 views

Puppet 6: PuppetDB won't start because of clojure/java errors

I've searched far and wide, and I just simply can't get it to work. I've searched everything I could find which contained "puppetdb", but without success. I have followed the documentation, and I ...
0
votes
1answer
16 views

Puppet : Custom resource creation failed

I have tried to create a custom resource type on Puppet which creates a file. However, after adding the type and providers in my module/lib folder and running puppet agent, using the new custom ...
0
votes
1answer
18 views

puppet 6 template variable from hiera can't be retreived

I'm having problem when migrating the puppet code from puppet 3 to puppet 6. This is the error message: Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: ...
0
votes
1answer
50 views

Puppet - importing a locally written (non-installed) module's functions

Say I have two locally extant modules that don't exist on Forge or in a custom Forge-like repo. These repos will never be installed via command line as they are part of a bigger deployment that cannot ...
1
vote
1answer
24 views

Does Apache proxy_mod support repeated directives?

For example is: <Proxy balancer://blah> BalancerMember ajp://127.0.0.1:8080 Proxyset lbmethod=bytraffic Proxyset stickysession=JSESSIONID Proxyset timeout=5 </Proxy> interpreted in ...
1
vote
1answer
31 views

Puppet unable to add user to AD group

I'm trying to add user to group on my DC using puppet: dsc_xgroup {'DomainAdministrators': dsc_ensure => 'present', dsc_memberstoinclude => 'tfl@ad.contoso.com',...
0
votes
0answers
10 views

Make Puppet Enterprise see changes to git repos referenced in the Puppetfile more quickly

I am using Puppet Enterprise 2017 to manage some servers. I use this Puppetfile: mod 'puppetlabs/stdlib', :latest mod 'kdc', :git => 'https://git.example.com/myrepos/kdc.git', :branch =>...
2
votes
1answer
128 views

how i do use puppet variable in facter custom facts

how i can inherit variable from puppet manifest in facter custom fact? in this case $job_name varible. I want use same custom fact with different envs. if $facts['hostname'] =~ /.*name.*/ { $...
28
votes
6answers
4k views

Have a system that expires SSH keys every 90th day

I have a customer that now requires us to change every password every 90th day due to their interpretation of GDPR. That's fine for the web-based system we develop for them because we can just ...
0
votes
0answers
192 views

Puppet: How do I insert XML properties with augeas?

I would like to update an existing XML file with augeas. Here is the file: <?xml version="1.0" encoding="UTF-8"?> <config control-bind="127.0.0.1:11111" version="1.0"> <web-server ...
0
votes
1answer
188 views

File conflict in Puppet between modules

I have run into a problem that I am sure is an simple fix but I can't seem to find any resources that explain the behavior correctly. I am building out a new nginx puppet module for automating git ...
-1
votes
1answer
33 views

Why can't I have more than two SSH connections to a server?

I am using Puppet PE 2017.3.5.0-1 on a CentOS7 AWS instance. When I SSH into this machine, to a default installation, I am getting limited to two connections only. When I try to connect again (from a ...
0
votes
1answer
119 views

User Authentication with Puppet and Active Directory

I've just started my internship in a governmental organisation, and my first assignment is to develop at user system for our internal serverfarm of 120+ Redhat and Windows servers. The internal ...
0
votes
0answers
16 views

How to link a file if certain condition is not met

define link () { file { "/etc/effective/${title}.json": ensure => 'link', target => "/etc/original/${title}.json", } # Working fine. # if the above fails and ends up ...
1
vote
1answer
73 views

Installing postgres via puppet doesn't refresh package list, install fails

I'm on OSX 10.13.6 host running VirtualBox 5.2.16 and vagrant 2.1.2 I'm trying to set up a VM with bento/ubuntu-18.04 using two provisioners: 1) inline shell, to get puppet and the required modules ...
0
votes
0answers
141 views

How to avoid specifying variables many times with puppet roles and profiles pattern?

I am writing puppet modules and trying to understand and implement roles and profiles pattern , along with some best practices, particularly about hiera autolookups and splitting the module into ...
0
votes
1answer
105 views

How do you test/troubleshoot hiera in a Puppet environment

I'm using Puppet alongside Foreman to provision hosts, and I've currently got all of Puppet config as modules in a repository. I'd like to use Hiera but I've never been able to get even the simplest ...
0
votes
2answers
126 views

Q: How to define Apache modules via Puppet and Hiera?

I am currently using Puppet with Foreman 1.17 and puppetlabs/apache version 3.1.0. All virtual hosts are defined using a .yaml file: apache::vhost: vm12345_ssl: servername: my.example.com ...
0
votes
1answer
143 views

install powershell gallery module using puppet

Hopefully this is the right place for this. i am using Puppet on Windows Server and looking to install a Powershell module found in the Powershell Gallery using Puppet. I have read through https://...
0
votes
1answer
50 views

Puppet 5 : Variables not interpolated

I'm trying to update an old Puppet 3 infrastructure to Puppet 5. I'm using Hiera to get the data, with a NoSQL backend. I've written my own ENC in order to get node data from there, and this is ...
0
votes
0answers
116 views

override .bash_profile on puppet config, for nodes

I have a puppet master configuration, which i have yet to identify what is overriding(deleting them replacing with a core file) the bash configs. I have solved one of two of my issues, the first ...
0
votes
1answer
19 views

Kernel upgrade and Oracle prerequisites error

I am upgrading kernel (Red Hat) from 6.7 to 6.9 with Amazon AMI and when I am installing Oracle through puppet I am getting this pre-requisite error. Error: Execution of '/usr/bin/yum -d 0 -e 0 -y ...
4
votes
1answer
93 views

What are the pros/cons of running Chef/Puppet at regular intervals?

I always worked where they used to run Puppet at regular intervals. So, distributing changes was easy and on the fly. In the new team, they frown upon running the Chef agent at regular intervals. They ...