Unexpected behavior that I think is a bug:
This doesn’t produce output, but I expect that it should:
[root@host ~]# /opt/puppet/bin/puppet apply -e 'exec { "echo foo && sleep 10": path => "/bin", timeout => 5, logoutput => true, }'
err: /Stage[main]//Exec[echo foo && sleep 10]/returns: change from notrun to 0 failed: Command exceeded timeout at line 1
notice: Finished catalog run in 5.07 seconds
All of these produce output as expected:
[root@host ~]# /opt/puppet/bin/puppet apply -e 'exec { "echo foo && sleep 10": path => "/bin", timeout => 15, logoutput => true, }'
notice: /Stage[main]//Exec[echo foo && sleep 10]/returns: foo
notice: /Stage[main]//Exec[echo foo && sleep 10]/returns: executed successfully
notice: Finished catalog run in 10.18 seconds
[root@host ~]# /opt/puppet/bin/puppet apply -e 'exec { "echo foo": path => "/bin", timeout => 10, logoutput => true, }'
notice: /Stage[main]//Exec[echo foo]/returns: foo
notice: /Stage[main]//Exec[echo foo]/returns: executed successfully
notice: Finished catalog run in 0.15 seconds
[root@host ~]# /opt/puppet/bin/puppet apply -e 'exec { "echo foo && false": path => "/bin", timeout => 10, logoutput => true, }'
notice: /Stage[main]//Exec[echo foo && false]/returns: foo
err: /Stage[main]//Exec[echo foo && false]/returns: change from notrun to 0 failed: echo foo && false returned 1 instead of one of [0] at line 1
notice: Finished catalog run in 0.14 seconds
You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account
That is a legitimate expectation, and the output should be logged in all cases. Thanks for the report.