The target system needs an interpreter or it won't understand the code you're sending it. The same as if you write a Bolt task in Python, you need Python on the target machine for it to be able to run the code.
But a Bolt Plan has inbuilt tasks to handle this, here's an example plan to install git via chocolatey with a bolt plan;
plan git_install::Windows_git (
TargetSpec $targets
) {
apply_prep($targets) # This installs the PE agent temporarily so it can
include chocolatey # include and use regular Puppet class from the chocolatey module
package { git :
ensure. => 'present',
provider => 'chocolatey',
}
}
If you already have the target connecting to a PE server you probably don't need to use apply_prep though as the agent is already installed.
This is a real life saver though if you have to manage a legacy infrastructure alongside a PE managed infrastructure as at the time of writing a PE module you can create a plan only a couple of lines long that'll allow you to reuse the same class on your legacy infrastructure.