mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 10:25:23 +00:00
22 lines
669 B
Smarty
22 lines
669 B
Smarty
# -*- mode: shell-script -*-
|
|
{% set default_rsync_opts = "--quiet --recursive --links --hard-links --chmod D755,F644 --times --devices --delete --timeout=300" %}
|
|
{% if rsync_binary is not defined %}
|
|
# Using default rsync binary location
|
|
RSYNC="/usr/bin/rsync"
|
|
{% else %}
|
|
# Using custom rsync binary location
|
|
RSYNC="{{ rsync_binary }}"
|
|
{% endif %}
|
|
{% if rsync_opts is not defined %}
|
|
# Using default rsync options
|
|
OPTS="{{ default_rsync_opts }}"
|
|
{% else %}
|
|
# Using custom rsync options
|
|
{% if rsync_opts.startswith('+') %}
|
|
{% set rsync_opts = default_rsync_opts+rsync_opts[1:] %}
|
|
{% endif %}
|
|
OPTS="{{ rsync_opts }}"
|
|
{% endif %}
|
|
SRC="{{ rsync_src }}"
|
|
DST="{{ rsync_dst }}"
|