Browse Source

Use Ansible task names, not comments.

Alex Payne 10 years ago
parent
commit
6d1eebb9d2
1 changed files with 3 additions and 6 deletions
  1. 3
    6
      roles/common/tasks/encfs.yml

+ 3
- 6
roles/common/tasks/encfs.yml View File

16
 - name: Add main user to fuse group
16
 - name: Add main user to fuse group
17
   user: name={{ main_user_name }} append=yes groups=fuse
17
   user: name={{ main_user_name }} append=yes groups=fuse
18
 
18
 
19
-# Check if the /encrypted directory is empty
20
-- name: Check for existing encfs
19
+- name: Check if the /encrypted directory is empty
21
   shell: ls /encrypted/*
20
   shell: ls /encrypted/*
22
   ignore_errors: True
21
   ignore_errors: True
23
   changed_when: False  # never report as "changed"
22
   changed_when: False  # never report as "changed"
24
   register: encfs_check
23
   register: encfs_check
25
 
24
 
26
-# If it is empty, we need to create the encfs
27
-- name: Create encfs
25
+- name: If /encrypted is empty, create the encfs there
28
   shell: printf "p\n{{ encfs_password }}" | encfs /encrypted /decrypted --public --stdinpass && touch /decrypted/test
26
   shell: printf "p\n{{ encfs_password }}" | encfs /encrypted /decrypted --public --stdinpass && touch /decrypted/test
29
   when: encfs_check.rc > 0
27
   when: encfs_check.rc > 0
30
 
28
 
31
-# If it isn't empty, we simply need to mount it (but only if /decrypted/test doesn't exist)
32
-- name: Mount encfs
29
+- name: If /encrypted isn't empty, mount it (but only if /decrypted/test doesn't exist)
33
   shell: printf "{{ encfs_password }}" | encfs /encrypted /decrypted --public --stdinpass creates="/decrypted/test"
30
   shell: printf "{{ encfs_password }}" | encfs /encrypted /decrypted --public --stdinpass creates="/decrypted/test"
34
   when: encfs_check.rc == 0
31
   when: encfs_check.rc == 0
35
 
32
 

Loading…
Cancel
Save