Puppet Bolt is an open-source, agentless orchestration tool that automates ad-hoc tasks, scripts, and multi-node workflows over standard SSH or WinRM.
Installation
# macOS (Homebrew)
brew install puppetlabs/puppet/puppet-bolt
# Windows (Chocolatey)
choco install puppet-bolt
# Linux (Debian / Ubuntu)
wget https://apt.puppet.com/puppet-tools-release-$(lsb_release -cs).deb
sudo dpkg -i puppet-tools-release-*.deb
sudo apt-get update && sudo apt-get install puppet-bolt
Creating a Task Module
Tasks can be authored in any language supported on the target hosts (Bash, Python, PowerShell, Ruby):
# Create tasks directory in module
mkdir -p ~/.puppetlabs/bolt/modules/mymodule/tasks
# Place script in the task folder
cp myscript.sh ~/.puppetlabs/bolt/modules/mymodule/tasks/
chmod +x ~/.puppetlabs/bolt/modules/mymodule/tasks/myscript.sh
Executing Tasks
Execute tasks across multiple remote nodes using SSH private key authentication:
bolt task run mymodule::myscript \
--targets node1.example.com,node2.example.com \
--user root \
--private-key ~/.ssh/id_rsa
Running Ad-Hoc Commands & Scripts
# Run a one-line command across inventory targets
bolt command run 'uptime' --targets all
# Execute a local script remotely
bolt script run ./deploy.sh --targets webservers