Andreas Vöst
2 years
Moritz Kraus
2 years
Emma Heinle
2 years
Emma Heinle
3 years
Claus-Theodor Riegg
3 years
Claus-Theodor Riegg
4 years
Andreas Vöst
4 years
Claus-Theodor Riegg
9 years
Claus-Theodor Riegg
8 years

Bolt: Run commands from a file

Posted . Visible to the public.

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 -

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 -
Andreas Vöst
Last edit
Marius Schuller
License
Source code in this card is licensed under the MIT License.