-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dylan Schultz <[email protected]>
- Loading branch information
1 parent
ecfdca0
commit c9b2116
Showing
4 changed files
with
34 additions
and
32 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,29 @@ | ||
--- | ||
- name: Find local key share | ||
delegate_to: localhost | ||
become: false | ||
stat: | ||
path: "{{ playbook_dir }}/keys/cosigner_{{ my_share}}/{{ item }}" | ||
register: has_share | ||
|
||
- name: Copy key to remote host | ||
copy: | ||
src: "keys/cosigner_{{ my_share}}/{{ item }}" | ||
dest: "{{ horcrux_dir }}/{{ item }}" | ||
owner: "{{ horcrux_user }}" | ||
group: "{{ horcrux_user }}" | ||
mode: '0400' | ||
when: has_share.stat.isreg is defined and has_share.stat.isreg | ||
|
||
- name: Verify remote key share | ||
stat: | ||
path: "{{ horcrux_dir }}/{{ item }}" | ||
register: share_moved | ||
|
||
- name: Delete local share | ||
become: false | ||
delegate_to: localhost | ||
file: | ||
path: "{{ playbook_dir }}/keys/cosigner_{{ my_share }}/{{ item }}" | ||
state: absent | ||
when: share_moved.stat.exists |
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