Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
1
votes
1
answers
2601
views
How do I apply a manifest from a Puppet Master server to a Puppet Agent node server?
I installed Puppet Agent on a CentOS 7 server. I installed Puppet Master on a different CentOS 7 server. I'm using the free version of Puppet on both servers. The Puppet Agent server requested a certificate. I signed it on the Puppet Master server. There is no software firewall on either server. The...
I installed Puppet Agent on a CentOS 7 server. I installed Puppet Master on a different CentOS 7 server. I'm using the free version of Puppet on both servers. The Puppet Agent server requested a certificate. I signed it on the Puppet Master server. There is no software firewall on either server. There is no firewall between the servers. I temporarily enabled port 8140 with SSHD. I used SSH to verify port 8140 was open. I then reverted SSHD to only listen on port 22. Port 8140 wasn't blocked.
nslookup
on the IP addresses and ping against the domain names shows that both servers have correct networking information about the other server. These are new servers. Puppet has never worked on them before. I created a simple manifest. I applied it to the Puppet Master server locally. It worked without errors. I then tried to apply it to the Puppet Agent server. It didn't work.
From the Puppet Master server, I ran this:
puppet agent neat.pp --server hostNameOfPuppetAgentServer --verbose
There were no errors on the Puppet Master server after I pressed enter. There was no output at all. This produced no logs on the Puppet Agent server. There was no evidence it worked on the Puppet Agent server. I checked, and the effects were not performed.
On the Puppet Master server I ran this:
puppet agent --server hostNameOfPuppetAgentServer --test
The results included Connection refused -- connect (2).
What is wrong? I expect the manifest to work on a Puppet Agent node.
Kiran
(321 rep)
Jan 20, 2016, 02:47 AM
• Last activity: Jul 24, 2025, 11:11 AM
1
votes
1
answers
1898
views
/var/lib/puppet/state/agent_catalog_run.lock exists
I'm seeing the following error on CentOS 6.4: # puppet agent --test Run of Puppet configuration client already in progress; skipping (/var/lib/puppet/state/agent_catalog_run.lock exists) What should I do about it?
I'm seeing the following error on CentOS 6.4:
# puppet agent --test
Run of Puppet configuration client already in progress; skipping
(/var/lib/puppet/state/agent_catalog_run.lock exists)
What should I do about it?
SunLynx
(101 rep)
May 18, 2015, 08:06 PM
• Last activity: Jul 8, 2025, 09:08 AM
4
votes
1
answers
10275
views
Should I add certificates to /usr/share/ca-certificates?
I try to automate to adding a certificate on an Ubuntu server 14.04 with puppet or a one liner command. I added certificates manually with these commands : mkdir /usr/share/ca-certificates/extra cp toto.crt /usr/share/ca-certificates/extra/toto.crt sudo dpkg-reconfigure ca-certificates I tried the c...
I try to automate to adding a certificate on an Ubuntu server 14.04 with puppet or a one liner command.
I added certificates manually with these commands :
mkdir /usr/share/ca-certificates/extra
cp toto.crt /usr/share/ca-certificates/extra/toto.crt
sudo dpkg-reconfigure ca-certificates
I tried the command : update-ca-certificates but it didn't update my /etc/ssl/certs/ca-certificates.crt.
I tried too the command : sudo dpkg-reconfigure ca-certificates (with and without the option -f noninteractive) but i can't to accept all my certificates automatically.
Damien Goldenberg
(43 rep)
Jun 23, 2015, 03:36 PM
• Last activity: Jul 1, 2025, 11:36 AM
2
votes
1
answers
2141
views
PM2 inside bash script deployed by puppet not working
#!/bin/bash # install needed RPMS yum -y install gcc-c++ git # downlaod and compile node wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz tar -xvzf node-v0.12.7.tar.gz cd node-v0.12.7 ./configure make sudo make install # install pm2 via npm /usr/local/bin/npm install pm2 -g # start processes...
#!/bin/bash
# install needed RPMS
yum -y install gcc-c++ git
# downlaod and compile node
wget https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
tar -xvzf node-v0.12.7.tar.gz
cd node-v0.12.7
./configure
make
sudo make install
# install pm2 via npm
/usr/local/bin/npm install pm2 -g
# start processes.json
cd /home/admin/Order-Management/
/usr/local/lib/node_modules/pm2/bin/pm2 start processes.json
The above script run perfectly when I run it locally but when I try to execute it with puppet on the client machine the last line throwing the following error.
/usr/bin/env: node: No such file or directory
I am using RedHat 6 master and RedHat 6 client. I saw a solution here
https://stackoverflow.com/questions/30281057/node-forever-usr-bin-env-node-no-such-file-or-director However it's not working for me.
user2178244
(21 rep)
Sep 8, 2015, 02:43 PM
• Last activity: May 3, 2025, 06:04 PM
6
votes
2
answers
17771
views
dpkg: warning: 'ldconfig' not found in PATH or not executable - Ubuntu 12 - Vagrant
I am working on setting up a Vagrant / Puppet install so that new developers can have a clean development environment for our Rails project. The basic Vagrant configure commands are: config.vm.box = 'precise32' config.vm.box_url = 'http://files.vagrantup.com/precise32.box' Overall, the install seems...
I am working on setting up a Vagrant / Puppet install so that new developers can have a clean development environment for our Rails project.
The basic Vagrant configure commands are:
config.vm.box = 'precise32'
config.vm.box_url = 'http://files.vagrantup.com/precise32.box '
Overall, the install seems to be going well. I've got RVM, Postgres, and Ruby installed and running.
However, whenever I try to install the "Heroku Toolbelt" using this command:
su -l vagrant -c 'wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh'
I run into this problem:
... Lots of Hits and downloads...
The following extra packages will be installed:
foreman heroku libruby1.9.1 ruby1.9.1
Suggested packages:
ruby1.9.1-examples ri1.9.1 graphviz ruby1.9.1-dev
The following NEW packages will be installed:
foreman heroku heroku-toolbelt libruby1.9.1 ruby1.9.1
0 upgraded, 5 newly installed, 0 to remove and 132 not upgraded.
Need to get 0 B/4,997 kB of archives.
After this operation, 13.1 MB of additional disk space will be used.
dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: error: 2 expected programs not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
(*Note*) This happens if I run the command manually after vagrant ssh. Also, the actual shell configuration gets the error when it initially runs.
Since this is a vagrant box, it is easy to 'vagrant destroy' and then try again but I get the same issue consistently.
The strange thing is, my PATH does definitely include those folders:
echo $PATH
/home/vagrant/.rvm/gems/ruby-1.9.3-p194/bin:/home/vagrant/.rvm/gems/ruby-1.9.3-p194@global/bin:/home/vagrant/.rvm/rubies/ruby-1.9.3-p194/bin:/home/vagrant/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/vagrant_ruby/bin
the file 'ldconfig' is in /sbin and is an executable:
cd /sbin
ls -l l*
-rwxr-xr-x 1 root root 465 Apr 20 2012 ldconfig
Same with start-stop-daemon:
-rwxr-xr-x 1 root root 26752 Apr 12 2012 start-stop-daemon
So, not sure what it is really complaining about... Any suggestions? Some permissions issue with Vagrant?
Dave Collins
(163 rep)
Aug 19, 2013, 08:25 PM
• Last activity: Mar 23, 2025, 07:46 PM
1
votes
0
answers
30
views
Importing Client Certs into Firefox
Making an attempt to put some client certs into Firefox on Red Hat. I am attempting to do this at provision using puppet. Everything I looked into said to put the key.db and cert.db files into a /home/{user}/.mozilla/firefox/foo.default. My problem is that .default is not created until after the fir...
Making an attempt to put some client certs into Firefox on Red Hat. I am attempting to do this at provision using puppet. Everything I looked into said to put the key.db and cert.db files into a /home/{user}/.mozilla/firefox/foo.default. My problem is that .default is not created until after the first time a user starts Firefox on the machine. Is there any good work around for this? I am almost tempted to run a firefox process as the required users and then kill it prior to attempting to stash the certs just to generate the appropriate default file.
BludShade
(11 rep)
Dec 16, 2024, 03:35 PM
0
votes
2
answers
880
views
Error during "apt-get full-upgrade": Missing libcrypt.so.1 library preventing libc6 configuration
When I try to do an `apt-get full-upgrade`, I get this error message: ``` Setting libc6:amd64 (2.36-9+deb12u7)... /usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory dpkg: error processing package libc6:amd64 (--configure): in...
When I try to do an
apt-get full-upgrade
, I get this error message:
Setting libc6:amd64 (2.36-9+deb12u7)...
/usr/bin/perl: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
dpkg: error processing package libc6:amd64 (--configure):
installed libc6:amd64 ackage post-installation script subprocess returned error exit status 127
Errors were encountered during execution:
libc6:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm trying to upgrade from Puppet 5 to Puppet 7.
I can't do it through the Puppet repository.
valentingrosse
(1 rep)
Jul 12, 2024, 11:51 AM
• Last activity: Jul 12, 2024, 10:52 PM
0
votes
1
answers
35
views
Where is "--localcacert" in Puppet man page?
I am new to Puppet. We have a command and it uses the `--localcacert` option. The command looks like this: puppet agent -t --localcacert --ca_server --onetime --waitforcert 30 I want to know what the option `--localcacert` do but it is not in the man page. It's not even here: https://www.puppet.com/...
I am new to Puppet. We have a command and it uses the
--localcacert
option. The command looks like this:
puppet agent -t --localcacert --ca_server --onetime --waitforcert 30
I want to know what the option --localcacert
do but it is not in the man page.
It's not even here: https://www.puppet.com/docs/puppet/5.5/man/agent
nor here: https://linux.die.net/man/8/puppet-agent
Why? The above command works, so therefore it is recognized by puppet
as a valid option, but why is it not in the man page?
Noob_Guy
(224 rep)
Feb 21, 2024, 06:00 AM
• Last activity: Feb 21, 2024, 06:25 AM
0
votes
1
answers
266
views
Most stable/efficient method for OpenStack deployment using Debian
I was wondering witch method to use to deploy OpenStack. I read [guides][1] of OpenStack, but there is no focusing on Debian. What is the most stable method to deploy OpenStack on Debian? [1]: https://docs.openstack.org/wallaby/deploy/index.html
I was wondering witch method to use to deploy OpenStack. I read guides of OpenStack, but there is no focusing on Debian.
What is the most stable method to deploy OpenStack on Debian?
Zaman Oof
(123 rep)
Sep 30, 2021, 11:39 AM
• Last activity: Jan 29, 2024, 01:22 PM
1
votes
1
answers
242
views
Unable to locate package pdk on debian
I am trying to install the external package `pdk` on debian bullseye. Following the [official instructions][1] I executed the following: ``` wget https://apt.puppet.com/puppet-tools-release-bullseye.deb dpkg -i puppet-tools-release-bullseye.deb apt-get update apt-get install pdk ``` Here are all the...
I am trying to install the external package
pdk
on debian bullseye. Following the official instructions I executed the following:
wget https://apt.puppet.com/puppet-tools-release-bullseye.deb
dpkg -i puppet-tools-release-bullseye.deb
apt-get update
apt-get install pdk
Here are all the steps I did on a fresh debian:bullseye
docker image:
1. Updating package list and installing wget
root@fb976189c8c6:/# apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 Packages [7951 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main arm64 Packages [250 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [14.9 kB]
Fetched 8424 kB in 2s (4213 kB/s)
Reading package lists... Done
root@fb976189c8c6:/# apt-get install wget
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
ca-certificates libpsl5 openssl publicsuffix
The following NEW packages will be installed:
ca-certificates libpsl5 openssl publicsuffix wget
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2126 kB of archives.
After this operation, 5853 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://deb.debian.org/debian bullseye/main arm64 openssl arm64 1.1.1w-0+deb11u1 [837 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 ca-certificates all 20210119 [158 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 libpsl5 arm64 0.21.0-1.2 [57.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 wget arm64 1.21-1+deb11u1 [946 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 publicsuffix all 20220811.1734-0+deb11u1 [127 kB]
Fetched 2126 kB in 0s (5603 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package openssl.
(Reading database ... 6656 files and directories currently installed.)
Preparing to unpack .../openssl_1.1.1w-0+deb11u1_arm64.deb ...
Unpacking openssl (1.1.1w-0+deb11u1) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../ca-certificates_20210119_all.deb ...
Unpacking ca-certificates (20210119) ...
Selecting previously unselected package libpsl5:arm64.
Preparing to unpack .../libpsl5_0.21.0-1.2_arm64.deb ...
Unpacking libpsl5:arm64 (0.21.0-1.2) ...
Selecting previously unselected package wget.
Preparing to unpack .../wget_1.21-1+deb11u1_arm64.deb ...
Unpacking wget (1.21-1+deb11u1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../publicsuffix_20220811.1734-0+deb11u1_all.deb ...
Unpacking publicsuffix (20220811.1734-0+deb11u1) ...
Setting up libpsl5:arm64 (0.21.0-1.2) ...
Setting up wget (1.21-1+deb11u1) ...
Setting up openssl (1.1.1w-0+deb11u1) ...
Setting up publicsuffix (20220811.1734-0+deb11u1) ...
Setting up ca-certificates (20210119) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/aarch64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl-base /usr/lib/aarch64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
129 added, 0 removed; done.
Processing triggers for libc-bin (2.31-13+deb11u7) ...
Processing triggers for ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
2. Download puppet-tools-release-bullseye.deb
root@fb976189c8c6:/# wget https://apt.puppet.com/puppet-tools-release-bullseye.deb
--2023-10-13 07:10:35-- https://apt.puppet.com/puppet-tools-release-bullseye.deb
Resolving apt.puppet.com (apt.puppet.com)... 18.173.154.43, 18.173.154.87, 18.173.154.2, ...
Connecting to apt.puppet.com (apt.puppet.com)|18.173.154.43|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11772 (11K) [application/x-debian-package]
Saving to: 'puppet-tools-release-bullseye.deb'
puppet-tools-release-bullseye.deb 100%[===================================================================================================================================================================>] 11.50K --.-KB/s in 0.002s
2023-10-13 07:10:36 (4.85 MB/s) - 'puppet-tools-release-bullseye.deb' saved [11772/11772]
3. Installing puppet-tools-release-bullseye.deb
root@fb976189c8c6:/# dpkg -i puppet-tools-release-bullseye.deb
Selecting previously unselected package puppet-tools-release.
(Reading database ... 7074 files and directories currently installed.)
Preparing to unpack puppet-tools-release-bullseye.deb ...
Unpacking puppet-tools-release (1.0.0-9bullseye) ...
Setting up puppet-tools-release (1.0.0-9bullseye) ...
4. Updating package list again and trying to install pdk
root@fb976189c8c6:/# apt-get update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Get:4 http://apt.puppet.com bullseye InRelease [83.7 kB]
Get:5 http://apt.puppet.com bullseye/puppet-tools arm64 Packages [549 B]
Get:6 http://apt.puppet.com bullseye/puppet-tools all Packages [549 B]
Fetched 84.8 kB in 1s (95.3 kB/s)
Reading package lists... Done
root@fb976189c8c6:/# apt-get install pdk
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package pdk
After execution of the last command I get the following error:
E: Unable to locate package pdk
I also cannot find the package pdk
in the available package list (apt list
).
What am I doing wrong?
pascalre
(113 rep)
Oct 12, 2023, 02:18 PM
• Last activity: Oct 16, 2023, 05:08 PM
4
votes
1
answers
353
views
Are any large-scale services based on NixOS or Guix System?
Following the permeation of virtualization and containerization through world of network services, various tools and systems have emerged for provisioning and orchestrating such systems from templates with applied custom overlays. However, most such systems operating from a POSIX base have simply ad...
Following the permeation of virtualization and containerization through world of network services, various tools and systems have emerged for provisioning and orchestrating such systems from templates with applied custom overlays.
However, most such systems operating from a POSIX base have simply adapted standard Linux-based operating systems for the new environments.
In contrast, [NixOS](https://en.wikipedia.org/wiki/NixOS) and [Guix System](https://en.wikipedia.org/wiki/GNU_Guix_System) would appear to be ideally suited for such applications, by their native architecture, centered around a read-only file base with overlays managed through a declarative language. Such design would appear to carry directly in the operating system much of the functionality intended to be injected into a standard operating system by projects such as Puppet, Chef, and Ansible.
Is NixOS or Guix System currently in use by any large-scale services?
brainchild
(340 rep)
Nov 8, 2022, 01:14 PM
• Last activity: Aug 28, 2023, 11:58 PM
1
votes
0
answers
1517
views
Puppet agent hangs on Loading facts from
# Info ``` root@slx04c-8odu:/home/xiaojguan# which puppet /usr/share/rvm/rubies/ruby-2.3.8/bin/puppet root@slx04c-8odu:/home/xiaojguan# puppet -V 3.8.6 root@slx04c-8odu:/home/xiaojguan# facter -v 1.7.5 root@slx04c-8odu:/home/xiaojguan# ll /var/lib/puppet/lib/facter/ total 188 drwxr-xr-x 3 root root...
# Info
root@slx04c-8odu:/home/xiaojguan# which puppet
/usr/share/rvm/rubies/ruby-2.3.8/bin/puppet
root@slx04c-8odu:/home/xiaojguan# puppet -V
3.8.6
root@slx04c-8odu:/home/xiaojguan# facter -v
1.7.5
root@slx04c-8odu:/home/xiaojguan# ll /var/lib/puppet/lib/facter/
total 188
drwxr-xr-x 3 root root 4096 Feb 25 2021 ./
drwxr-xr-x 4 root root 4096 Nov 22 2020 ../
-rw-r--r-- 1 root root 430 Nov 22 2020 README.md
-rw-r--r-- 1 root root 916 Nov 22 2020 asset.rb
-rw-r--r-- 1 root root 3842 Nov 22 2020 bmc.rb
-rw-r--r-- 1 root root 620 Nov 22 2020 broadcast.rb
-rw-r--r-- 1 root root 66 Nov 22 2020 check_nsx_manager.rb
-rw-r--r-- 1 root root 627 Nov 22 2020 cidr.rb
-rw-r--r-- 1 root root 1683 Feb 25 2021 cloudnative.rb
-rw-r--r-- 1 root root 581 Nov 22 2020 core_count.rb
-rw-r--r-- 1 root root 1016 Nov 22 2020 default_gateway.rb
-rw-r--r-- 1 root root 294 Nov 22 2020 default_route.rb
-rw-r--r-- 1 root root 1250 Nov 22 2020 dhcp_server.rb
-rw-r--r-- 1 root root 4313 Nov 22 2020 disks.rb
-rw-r--r-- 1 root root 305 Nov 22 2020 efi.rb
-rw-r--r-- 1 root root 1116 Nov 22 2020 esx.rb
-rw-r--r-- 1 root root 4667 Nov 22 2020 facter_dot_d.rb
-rw-r--r-- 1 root root 236 Nov 22 2020 ip6tables_version.rb
-rw-r--r-- 1 root root 444 Nov 22 2020 iptables_persistent_version.rb
-rw-r--r-- 1 root root 234 Nov 22 2020 iptables_version.rb
-rw-r--r-- 1 root root 1792 Nov 22 2020 metadisks.rb
-rw-r--r-- 1 root root 374 Nov 22 2020 my-vars.rb
-rw-r--r-- 1 root root 183 Nov 22 2020 nameserver.rb
-rw-r--r-- 1 root root 6228 Nov 22 2020 nics.rb
-rw-r--r-- 1 root root 542 Nov 22 2020 nvidia_3d.rb
-rw-r--r-- 1 root root 114 Nov 22 2020 nvidia_product_id.rb
-rw-r--r-- 1 root root 564 Nov 22 2020 ovs_client_cert.rb
-rw-r--r-- 1 root root 1172 Nov 22 2020 pe_version.rb
-rw-r--r-- 1 root root 184 Nov 22 2020 proc_mounts.rb
-rw-r--r-- 1 root root 620 Nov 22 2020 processor_frequency.rb
-rw-r--r-- 1 root root 937 Nov 22 2020 puppet_vardir.rb
-rw-r--r-- 1 root root 20125 Nov 22 2020 raid.rb
-rw-r--r-- 1 root root 875 Nov 22 2020 root_home.rb
-rw-r--r-- 1 root root 213 Nov 22 2020 service_daemon_helper.rb
-rw-r--r-- 1 root root 618 Nov 22 2020 staging_http_get.rb
-rw-r--r-- 1 root root 251 Nov 22 2020 staging_windir.rb
-rw-r--r-- 1 root root 149 Nov 22 2020 swap_file_exists.rb
-rw-r--r-- 1 root root 790 Nov 22 2020 swapon_size.rb
drwxr-xr-x 2 root root 4096 Nov 22 2020 util/
-rw-r--r-- 1 root root 146 Nov 22 2020 var_mb.rb
# Problem description
When I run puppet agent -t --debug --verbose
on ubuntu 20.04
it just hangs at this stage:
Debug: Loading facts from /var/lib/puppet/lib/facter/puppet_vardir.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/esx.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/asset.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nvidia_product_id.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/core_count.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/efi.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nvidia_3d.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/disks.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/swapon_size.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nics.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/service_daemon_helper.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/cidr.rb
I use strace to trace the process and got this:
root@slx04c-7tgb:/var/lib/puppet/lib# strace -p $(ps aux | grep applying | grep -v grep | awk '{ print $2}')
strace: Process 13250 attached
select(10, , [], NULL, NULL
# Things I tried
1. change the directory var/lib/puppet/lib/facter
and rerun the puppet agent with these commands:
mv /var/lib/puppet/lib/facter /var/lib/puppet/lib/facter-bak
puppet agent -t --debug --verbose
# Expectation
1. how to know which snippet of code is stuck
2. how to make the puppet agent okay to run
# Thanks in advance
xiaojueguan
(173 rep)
Aug 26, 2021, 07:18 AM
• Last activity: Aug 13, 2023, 02:56 PM
1
votes
1
answers
31
views
How to enforce that group X membership implies group Y membership in Puppet?
I'd like all users who are members of the 'users' group to also be members of the 'audio', 'lp' and 'video' groups. How can I enforce this in Puppet **without specifying any of the usernames?** The goal would be something like the following: user { something_that_resolves_to_all_usernames_in_the_use...
I'd like all users who are members of the 'users' group to also be members of the 'audio', 'lp' and 'video' groups. How can I enforce this in Puppet **without specifying any of the usernames?** The goal would be something like the following:
user { something_that_resolves_to_all_usernames_in_the_users_group
groups => ['audio', 'lp', 'video'],
auth_membership => false,
}
l0b0
(53368 rep)
Jan 9, 2017, 08:47 PM
• Last activity: Mar 24, 2023, 12:36 PM
2
votes
1
answers
50
views
When you use puppet, how do you separate the provisioning and maintenance code?
So say you're using puppet. Initially you might use the puppet server to set it up with a puppet agent to setup your server (you might, then again you might use images, but I'm using puppet). Let's say that the initial provisioning goes well and then you decide you need to add some more settings to...
So say you're using puppet. Initially you might use the puppet server to set it up with a puppet agent to setup your server (you might, then again you might use images, but I'm using puppet).
Let's say that the initial provisioning goes well and then you decide you need to add some more settings to your server; but you don't want to re-provision it completely; wipe out the database on the system and start from scratch; instead you'd rather add the settings, perhaps remove some old ones, and then restart your daemon (which to be fair, may already be done by puppet)
Do you:
a. Comment out the initial provisioning code before running
b. Set a variable that can used by the code to prevent it from being re-provisioned? How is this situation properly handled? Because handling it wrong seems likely to lead to disaster (recovery).
puppet apply
?b. Set a variable that can used by the code to prevent it from being re-provisioned? How is this situation properly handled? Because handling it wrong seems likely to lead to disaster (recovery).
leeand00
(4927 rep)
Jun 30, 2017, 08:40 PM
• Last activity: Mar 24, 2023, 12:26 PM
3
votes
1
answers
196
views
Why is a variable in a `require`d module not always available?
I've got three module manifests in separate files (stripped down to bare essentials): class users { $user = 'foo' user { $user: ensure => present; } } class dvcs_cli { require users file { "/home/${::users::user}/.gitconfig": ensure => present, source => 'puppet:///modules/dvcs_cli/.gitconfig'; } }...
I've got three module manifests in separate files (stripped down to bare essentials):
class users {
$user = 'foo'
user { $user:
ensure => present;
}
}
class dvcs_cli {
require users
file { "/home/${::users::user}/.gitconfig":
ensure => present,
source => 'puppet:///modules/dvcs_cli/.gitconfig';
}
}
class shell {
require users
file { "/home/${::users::user}/.bash_aliases":
ensure => present,
source => 'puppet:///modules/shell/bash_aliases.sh';
}
}
.gitconfig
is created in /home/foo
as expected, but **.bash_aliases
is created in /home
**:
$ sudo /usr/bin/puppet apply --modulepath modules --detailed-exitcodes --hiera_config=hieradata/hiera.yaml manifests/host.pp || [ $? -eq 2 ]
[…]
Notice: /Stage[main]/Shell/File[/home//.bash_aliases]/ensure: defined content as '{md5}[…]'
Notice: /Stage[main]/Shell/File[/home/foo/.gitconfig]/ensure: defined content as '{md5}[…]'
It's as if ${::users::user}
evaluates to the empty string in one module, but not in the other. How is this possible?
---
Running with --debug
revealed a possible issue: **User[foo]
is autorequired for dvcs_cli
, but not for shell
:**
$ grep 'Adding autorequire relationship with User' puppet.log | grep -i -e dvcs_cli -e shell
Debug: /Stage[main]/Dvcs_cli/File[/home/pair/.gitconfig]: Adding autorequire relationship with User[pair]
This contradicts the manual , which says:
> If Puppet is managing the user or group that owns a file, the file resource will autorequire them.
Could this be related to the "Autorequire relationships are opaque" , caused by the fact that both files are in the same directory? And shouldn't autorequires be irrelevant anyway, since both modules explicitly require users
?
---
Running
$ puppet --version
4.2.1
on
$ cat /etc/redhat-release
Fedora release 24 (Twenty Four)
l0b0
(53368 rep)
Sep 5, 2016, 03:18 PM
• Last activity: Mar 24, 2023, 11:44 AM
0
votes
1
answers
200
views
Convert puppet manifest config to hiera
I installed corosync-pacemaker cluster via puppet. Now I would to like keep my data into hiera file. How should I convert cs_primitive section into yaml file? cs_primitive { 'nfsshare_fs': primitive_class => 'ocf', primitive_type => 'Filesystem', provided_by => 'heartbeat', parameters => { 'device'...
I installed corosync-pacemaker cluster via puppet. Now I would to like keep my data into hiera file. How should I convert cs_primitive section into yaml file?
cs_primitive { 'nfsshare_fs':
primitive_class => 'ocf',
primitive_type => 'Filesystem',
provided_by => 'heartbeat',
parameters => { 'device' => '/dev/disk/lvname', 'directory' => '/share', 'fstype' => 'ext4' },
}->
I tried the below code but it didn't work.
corosync::cs_primitive:
'nfsshare_fs':
primitive_class: 'ocf'
primitive_type: 'Filesystem'
provided_by: 'heartbeat'
parameters:
device: '/dev/disk/by-id/lvname'
directory: '/share'
fstype: 'ext4'
Thanks.
fortunate1357
(1 rep)
Apr 4, 2022, 06:21 PM
• Last activity: Jul 14, 2022, 07:27 PM
3
votes
2
answers
594
views
Python-friendly machine configuration management systems
Are there machine configuration management systems akin to: - Puppet - Chef which are natively, or at least intimately, Python-friendly? Any recommendations with supporting evidence and/or backing reasoning as to why? (The two systems above have a penchant for Ruby.)
Are there machine configuration management systems akin to:
- Puppet
- Chef
which are natively, or at least intimately, Python-friendly?
Any recommendations with supporting evidence and/or backing reasoning as to why?
(The two systems above have a penchant for Ruby.)
Maroloccio
(145 rep)
Sep 11, 2013, 12:15 PM
• Last activity: Jun 10, 2022, 03:59 PM
1
votes
3
answers
5356
views
Puppet Recursive File Permissions
When using a Puppet file resource with recurse=>true is it possible to have directories and files get different permissions? That is we generally want to remove read/execute permissions from group for all non-directory files. However, directories should retain the execute permission since that is re...
When using a Puppet file resource with recurse=>true is it possible to have directories and files get different permissions?
That is we generally want to remove read/execute permissions from group for all non-directory files. However, directories should retain the execute permission since that is required to enter the directory.
Some utilities (e.g. umask) are intelligent enough to deal with this but it looks like Puppet may not be. Am I missing anything?
LJKims
(469 rep)
Jun 19, 2017, 07:15 PM
• Last activity: Jun 19, 2021, 07:41 AM
5
votes
6
answers
3637
views
Can we install puppet without touching the servers?
I heard that puppet need to be installed on server side, not just desktop side, from where we want to launch commands on the servers. **My question:** Are there any other methods for using puppet? I mean we don't want to install it on server side, just run scripts from our Desktop on the servers..
I heard that puppet need to be installed on server side, not just desktop side, from where we want to launch commands on the servers.
**My question:** Are there any other methods for using puppet? I mean we don't want to install it on server side, just run scripts from our Desktop on the servers..
evachristine
(2689 rep)
May 14, 2014, 07:29 AM
• Last activity: May 25, 2021, 04:51 PM
1
votes
0
answers
147
views
Do I only need to run command at once on puppet
I would like to run below command in puppet at one time for example if i had a one directory(/tmp/example) which contains **example-releases-88.99.05-rc1.tar.gz** file only coming at certain point. Only on that time need to move new name(example-releases-stable.tar.gz) and extarct it, otherwise **ex...
I would like to run below command in puppet at one time for example if i had a one directory(/tmp/example) which contains **example-releases-88.99.05-rc1.tar.gz** file only coming at certain point. Only on that time need to move new name(example-releases-stable.tar.gz) and extarct it, otherwise **example-releases-stable.tar.gz** will not move at any time.
exec { 'fetching_example_tarball':
cwd => '/tmp/example',
command => "mv /tmp/example/example-releases-* /tmp/example/example-releases-stable.tar.gz && sleep 5m"
path => ['/usr/bin', '/usr/sbin',],
}
Above snippet running only when the file creates **example-releases-88.99.05-rc1.tar.gz** otherwise need to skip.
The problem is second time while running puppet getting error because of move command throw error like **same file not able to move**.
Could you please help on that ?
Thanks,
Vasanth M.Vasanth
(13 rep)
Feb 23, 2021, 08:30 AM
• Last activity: Feb 23, 2021, 09:33 AM
Showing page 1 of 20 total questions