@nacc, I've tested puppet 3.8 from your ppa, and found one issue with it. It 
looks like 'defaultfor' works well only when it compares values for facts.
:exists doesn't look like a fact, and defaultfor works incorrectly. I fixed it 
by adding fact :runs_on_systemd and testing its value instead, see attached 
patch.

Don't know if it applicable for puppet 4.5 though.

Without the patch

# puppet apply -dv --execute 'service{cron:}'
...
Info: Applying configuration version '1469565569'
Debug: Executing '/usr/sbin/service cron status'
Debug: Finishing transaction 30515820
Debug: Storing state
Debug: Stored state in 0.51 seconds
Notice: Finished catalog run in 1.09 seconds
...

With patch applied

# puppet apply -dv --execute 'service{cron:}'
...
Info: Applying configuration version '1469565628'
Debug: Executing '/bin/systemctl is-active cron'
Debug: Finishing transaction 33627360
Debug: Storing state
Debug: Stored state in 0.45 seconds
Notice: Finished catalog run in 1.11 seconds
...

I use Ubuntu 16.04.1, no upstart installed.

** Patch added: "runs_on_systemd.patch"
   
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1570472/+attachment/4707718/+files/runs_on_systemd.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1570472

Title:
  Set systemd as default service provider

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1570472/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to