Procházet zdrojové kódy

ssh source: fixed invalid selectors paths if absolute

Fabian Peter Hammerle před 9 roky
rodič
revize
53fb983d82
1 změnil soubory, kde provedl 6 přidání a 4 odebrání
  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 %}