Kaynağa Gözat

added option encrypt_key

Fabian Peter Hammerle 8 yıl önce
ebeveyn
işleme
00c2b87621
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      tasks/main.yml

+ 6 - 1
tasks/main.yml

@@ -11,7 +11,12 @@
       {% if source.source_host is defined %}
       mount_path="$(mktemp --tmpdir --directory ansible-duplicity-sshfs-XXXXXXXX)"; sshfs "{{source.source_host}}:{{source.source_path}}" $mount_path;
       {%- endif %}
-      duplicity --no-encryption --no-print-statistics --verbosity warning
+      duplicity --no-print-statistics --verbosity warning
+      {%- if target.encrypt_key is defined %}
+       --encrypt-key "{{target.encrypt_key}}"
+      {%- else %}
+       --no-encryption
+      {%- endif %}
       {%- for selector in source.selectors|default([]) %}
       {% if selector['option'] in ['exclude', 'include'] %}
        --{{selector['option']}}