Просмотр исходного кода

ssh source: fixed invalid selectors paths if absolute

Fabian Peter Hammerle 8 лет назад
Родитель
Сommit
53fb983d82
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      tasks/main.yml

+ 6 - 4
tasks/main.yml

@@ -12,12 +12,14 @@
       duplicity --no-encryption --no-print-statistics --verbosity warning
       {%- for selector in item.selectors|default([]) %}
       {% if selector['option'] in ['exclude', 'include'] %}
-       --{{selector['option']}} "{{selector['shell_pattern']}}"
-      {%- endif %}
-      {% endfor %}
+       --{{selector['option']}}
       {%- if item.source_host is defined %}
-       --name "{{item.source_host}}:{{item.source_path}}"
+       "{{ selector['shell_pattern'] | replace(item.source_path, '$mount_path') }}"
+      {%- else %}
+       "{{selector['shell_pattern']}}"
       {%- endif %}
+      {%- endif %}
+      {% endfor %}
       {%- if item.source_host is defined %}
        --allow-source-mismatch "$mount_path"
       {%- else %}