-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e131e06
commit 27b5ecc
Showing
15 changed files
with
298 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- name: Create a directory for hooks | ||
become: yes | ||
file: | ||
path: "/usr/local/server-secure-storage/{{ enc_mount_name }}/hooks.d/{{ item }}" | ||
state: directory | ||
with_items: | ||
- pre_mount | ||
- post_mount | ||
- pre_unmount | ||
- post_unmount | ||
|
||
- name: Adding hooks | ||
become: yes | ||
template: | ||
src: "usr/local/server-secure-storage/hooks.d/{{ item }}/001_default.sh" | ||
dest: "/usr/local/server-secure-storage/{{ enc_mount_name }}/hooks.d/{{ item }}/001_default.sh" | ||
mode: +x | ||
with_items: | ||
- pre_mount | ||
- post_mount | ||
- pre_unmount | ||
- post_unmount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
- name: Mount a volume first time with the secret passphrase (with filesystem formatting) | ||
become: yes | ||
no_log: True | ||
shell: "/usr/local/bin/tcmount-{{ enc_mount_name }}.sh '{{ enc_hidden_volume_passphrase }}' --format" | ||
vars: | ||
ansible_ssh_pipelining: no | ||
when: storage_file.stat.exists == False | ||
|
||
- name: Mount a volume usually with the secret passphrase | ||
become: yes | ||
no_log: True | ||
no_log: "{{ hide_sensitive_output }}" | ||
shell: "/usr/local/bin/tcmount-{{ enc_mount_name }}.sh '{{ enc_hidden_volume_passphrase }}'" | ||
when: storage_file.stat.exists == True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
source /usr/local/lib/server-secure-storage.sh | ||
|
||
# | ||
# This file is automatically generated by Ansible | ||
# All changes made manually to this file will be LOST! | ||
# | ||
|
||
### GENERATED BY ANSIBLE | ||
MAPPED_DEVICE_PATH=/dev/mapper/{{ enc_mount_name }} | ||
LOOPBACK_CACHE_PATH=/tmp/{{ enc_mount_name }} | ||
ENC_FILE={{ enc_file }} | ||
MOUNT_PATH={{ enc_mount_path }} | ||
MOUNT_NAME={{ enc_mount_name }} | ||
MOUNT_FS={{ enc_file_filesystem }} | ||
HOOKS_DIR=/usr/local/server-secure-storage/{{ enc_mount_name }}/hooks.d/ | ||
### END OF GENERATED BY ANSIBLE | ||
|
||
main () { | ||
exec_hooks "pre_unmount" | ||
umount_previously_mounted_volume | ||
exec_hooks "pre_unmount" | ||
} |
Oops, something went wrong.