浏览代码

Move tarsnap.key from /root to /decrypted and don't overwrite it if one already exists (fixes #15)

Justin Plock 10 年前
父节点
当前提交
d19e9a7d73
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 2 次插入4 次删除
  1. 0
    0
      roles/tarsnap/files/decrypted_tarsnap.key
  2. 1
    2
      roles/tarsnap/files/tarsnaprc
  3. 1
    2
      roles/tarsnap/tasks/tarsnap.yml

roles/tarsnap/files/root_tarsnap.key → roles/tarsnap/files/decrypted_tarsnap.key 查看文件


+ 1
- 2
roles/tarsnap/files/tarsnaprc 查看文件

@@ -1,5 +1,4 @@
1
-keyfile /root/tarsnap.key
1
+keyfile /decrypted/tarsnap.key
2 2
 cachedir /usr/tarsnap-cache
3 3
 exclude /usr/tarsnap-cache
4 4
 humanize-numbers
5
-

+ 1
- 2
roles/tarsnap/tasks/tarsnap.yml 查看文件

@@ -38,7 +38,6 @@
38 38
     dest="/root/tarsnap-autoconf-{{ tarsnap_version }}.tgz"
39 39
     sha256sum={{ tarsnap_sha.stdout_lines[0] }}
40 40
 
41
-
42 41
 - name: Decompress Tarsnap source
43 42
   command: tar xzf /root/tarsnap-autoconf-{{ tarsnap_version }}.tgz chdir=/root creates=/root/tarsnap-autoconf-{{ tarsnap_version }}/COPYING
44 43
 
@@ -49,7 +48,7 @@
49 48
   command: make all install clean chdir=/root/tarsnap-autoconf-{{ tarsnap_version }} creates=/usr/local/bin/tarsnap
50 49
 
51 50
 - name: Copy Tarsnap key file into place
52
-  copy: src=root_tarsnap.key dest=/root/tarsnap.key owner=root group=root
51
+  copy: src=decrypted_tarsnap.key dest=/decrypted/tarsnap.key owner=root group=root force=no
53 52
 
54 53
 - name: Create Tarsnap cache directory
55 54
   file: state=directory path=/usr/tarsnap-cache

正在加载...
取消
保存