Read more

Bolt: Run commands from a file

Andreas Vöst
July 11, 2022Software engineer at makandra GmbH

There's a simple way in bolt to run commands from a file Show archive.org snapshot without caring about BASH escaping:

# /home/user/foo.sh
echo "$(hostname -f): $(uptime)"
echo "${USER}"
echo "${SERVERLIST}" | bolt command run @foo.sh --run-as root --targets -
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

Use script run Show archive.org snapshot to run a ruby script:

#!/usr/bin/env ruby
# /home/user/bar.rb

puts 'Hello, world!'
echo "${SERVERLIST}" | bolt script run ./bar.rb  --targets -
Posted by Andreas Vöst to makandra Operations (2022-07-11 13:23)