Claus-Theodor Riegg
6 years
Claus-Theodor Riegg
7 years
Claus-Theodor Riegg
7 years
Claus-Theodor Riegg
7 years
Claus-Theodor Riegg
7 years
Claus-Theodor Riegg
8 years
Claus-Theodor Riegg
8 years
Claus-Theodor Riegg
8 years

Bolt: Run commands from a file

Posted Almost 2 years ago. 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
Almost 2 years ago
Deleted user #4941
License
Source code in this card is licensed under the MIT License.