2

I am writing a bash script that will be run by puppet by an Exec resource (I know. It is not ideal). I would like to know if is possible create debug messages in the script. Normally in Bash I use echo and in a manifest I use notify. But echo seems not work when the script is executed as an Exec resource in Puppet.

1 Answer 1

4

Check the documentation here for the logoutput attribute: https://docs.puppet.com/puppet/latest/reference/types/exec.html#exec-attribute-logoutput

You can always see the output from your echo in the script during Puppet agent execution with logoutput set to true.

For example:

exec { '/bin/sh script.sh': logoutput => true }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.