I am writing a bash script for the public (and myself) to set up a Puppet / TheForeman server real quick on a Ubuntu 14.04 LTS server, which is based on this HOWTO. I have done nothing on the part of DNS.
ping $(hostname -f)
PING foreman.test.local (192.168.1.2) 56(84) bytes of data.
64 bytes from foreman.test.local (192.168.1.2): icmp_seq=1 ttl=64 time=0.035 ms
64 bytes from foreman.test.local (192.168.1.2): icmp_seq=2 ttl=64 time=0.049 ms
64 bytes from foreman.test.local (192.168.1.2): icmp_seq=3 ttl=64 time=0.054 ms
64 bytes from foreman.test.local (192.168.1.2): icmp_seq=4 ttl=64 time=0.054 ms
After running the bash script I expect the test to give good results, but instead I get an error message:
sudo puppet agent --test
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find foreman.test.local via exec: Execution of '/etc/puppet/node.rb foreman.test.local' returned 1:
Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node foreman.test.local: Failed to find foreman.test.local via exec: Execution of '/etc/puppet/node.rb foreman.test.local' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
When you read it seems like an option to choose
sudo apt-get install puppetmaster -y
but that is the problem and doesn't work in this case.
So in this case it should be
wget apt.puppetlabs.com/puppetlabs-release-trusty.deb
and
dpkg -i puppetlabs-release-trusty.deb
instead!