puppet agent jessie not started after install with dpkg (BUG)
I use razor along with debian preseed
My os_boot.erb downloads the agent .deb package (dependencies are installed before using d-i)
Then dpkg -i <package> will installed the package which succeeds)
Nevertheless the service will not start via systemd, because the postinst script doesn't enable the service ?!?.
When debian configures the package, 2 arguments will be passed:
The postinstall script then wrongly does:
if [ -z "$2" ]; then systemctl enable puppet.service >/dev/null || : else systemctl try-restart puppet.service >/dev/null || : fi
The "try-restart" will never succeed due the fact that the service hasn't been enabled before.
Systemd considers the service as dead ;-)
Don't puppet inc. test their packages ?!??!
In the postinstall script you have to:
1.) Check if the service hasn't been enabled.
2.)If not, enable the service and then start the service
My workraround in os_boot.erb
/bin/systemctl enable puppet.service 2>&1>/dev/null /bin/systemctl restart puppet 2>&1>/dev/null
Quite annoying though !