solar-resources/resources/remote_file/actions/run.sh
2015-10-13 11:45:42 +03:00

11 lines
246 B
Bash

mkdir -p {{dest}}
{% for transport in remote %}
{% if transport.name == 'ssh' %}
scp -i {{transport.key}} -r {{transport.user}}@{{remote_ip}}:/{{remote_path}} {{dest}}
exit 0
{% endif %}
{% endfor %}
echo 'No suitable transport.'
exit 2