Hi all,
I have some sample script
#!/bin/bash
#ip=$2
tar_file=$1
bkp_name="bkp-$$"
if [ -z "${tar_file}" ]; then
echo "Usage import.sh [tar file]"
exit 1
fi
for keyspace
do
keyspace=$(basename "${tar_file}" ".tar.gz")
mkdir -p "${bkp_name}"
tar -xvzf "${tar_file}" -C "${bkp_name}"
echo "Drop keyspace ${keyspace}"
cqlsh localhost -e "drop keyspace \"${keyspace}\";"
echo "Create empty keyspace: ${keyspace}"
cat "${bkp_name}/${keyspace}.sql" | cqlsh localhost
for dir in "${bkp_name}/${keyspace}/"*; do
sstableloader -d localhost${dir}"
done
done
How can I include entire script above in ansible-playbook ...?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c50364b2-05c3-4a82-9432-21ae0cd3842c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.