Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regular archive works as well and does not depend on GNU tar
- Loading branch information
Showing
3 changed files
with
19 additions
and
323 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,36 +1,32 @@ | ||
- file: | ||
path: '{{playbook_dir}}/tmp/database.tar.gz' | ||
path: "{{playbook_dir}}/tmp/database.tar.gz" | ||
state: absent | ||
delegate_to: localhost | ||
name: remove possibly exisiting archive | ||
|
||
- shell: | | ||
- name: create archive | ||
shell: | | ||
set -eux | ||
DEPLOY_DIR='{{playbook_dir}}' | ||
cd $DEPLOY_DIR/../database | ||
$DEPLOY_DIR/bin/git-archive-all -v $DEPLOY_DIR/tmp/database.tar.gz | ||
tar -cz --exclude-vcs --exclude-vcs-ignores --exclude "./spec" \ | ||
-f "{{playbook_dir}}/tmp/database.tar.gz" . | ||
delegate_to: localhost | ||
name: create archive | ||
|
||
- file: | ||
path: '{{leihs_database_path}}' | ||
path: "{{leihs_database_path}}" | ||
state: absent | ||
name: remove existing {{leihs_database_path}} | ||
|
||
- file: | ||
path: '{{leihs_database_path}}' | ||
path: "{{leihs_database_path}}" | ||
state: directory | ||
owner: '{{leihs_database_user}}' | ||
owner: "{{leihs_database_user}}" | ||
recurse: yes | ||
name: create empty {{leihs_database_path}} | ||
|
||
- file: | ||
path: /tmp/database.tar.gz | ||
state: absent | ||
name: remove existing archive | ||
|
||
- unarchive: | ||
src: '{{playbook_dir}}/tmp/database.tar.gz' | ||
dest: '{{leihs_database_path}}' | ||
owner: '{{leihs_database_user}}' | ||
src: "{{playbook_dir}}/tmp/database.tar.gz" | ||
dest: "{{leihs_database_path}}" | ||
owner: "{{leihs_database_user}}" | ||
name: extract archive |
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