Puppet Version: All 5.X
Puppet Server Version: All 5.X
OS Name/Version: Red Hat/CentOS/OEL 6 and 7
Something changed between puppet 4 and puppet 5 where exec resources now require output redirection to be executed in the background.
This can be used to execute activities that may be long running but should not interrupt the Puppet process since nothing depends on the success of the activity.
An example of this is restarting the network without interrupting the Puppet run (which would be bad). A practical example can be found at https://github.com/simp/pupmod-simp-network/blob/master/manifests/init.pp#L23-L31
Puppet exec resources should not require arbitrary output redirection to be able to run a command in the background. Alternatively, a parameter could be added to exec that notes that the command should be run in the background and detached (this would be preferred).
Arbitrary output redirection is required to run processes in the background.
I've assigned this to henrik.lindberg since I believe that we spoke about it on Slack at some point and he may have more relevant information from that time period.