Ad hoc commands

At the very basic core of Puppet Bolt, we issue remote commands, send scripts, and run scripts. Bolt provides three simple commands to do just that: bolt command runbolt file upload, and bolt script run. To test our SSH key from earlier, let's run a simple command using bolt command run:

rary at Ryans-MacBook-Pro-3 in ~/workspace/packt/bolt$ bolt command run "echo 'Hello World'" --nodes puppetserver --no-host-key-checkStarted on puppetserver.puppet.net...Finished on puppetserver.puppet.net:  STDOUT:    Hello WorldSuccessful on 1 node: pe-puppet-master.puppet.netRan on 1 node in 0.40 seconds

For simple one-off tasks, running the bolt command can be a great way to inspect a system. When we have a larger list of instructions to ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.