When I try to run puppet in foreman, it failed (the error is as above). The reason is that I have not configured to allow the ‘puppet kick’ to run. Here is how to make it work:
1) Add the following in the [main] section of /etc/puppet/puppet.conf
listen = trun
2) Add the following in /etc/puppet/auth.conf
# Allow puppet kick
path /run
method save
auth any
allow *
In my lab, I use sys_puppet module to push the puppet config and auth file. Now foreman can happily kick puppet node to run 🙂
Reference:
https://docs.puppetlabs.com/references/stable/man/kick.html