-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added s3fs fuse and backblaze backups folder
Added s3fs fuse and backblaze backups folder Added s3fs fuse and backblaze backups folder
- Loading branch information
Jon Clayton
committed
Mar 8, 2021
1 parent
c7f6121
commit 9d7f2a1
Showing
7 changed files
with
73 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
- name: Re-gather facts | ||
setup: ~ | ||
#- install GlusterFS server | ||
|
||
- name: Add Gluster Key | ||
|
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,55 @@ | ||
- name: Install packages for s3fs fuse | ||
apt: | ||
pkg: | ||
- libfuse-dev | ||
- fuse | ||
- build-essential | ||
- libcurl4-openssl-dev | ||
- libxml2-dev | ||
- pkg-config | ||
- libssl-dev | ||
- automake | ||
- git | ||
|
||
- name: Create directory for mounting blackblaze s3fs fuse to | ||
file: | ||
path: /backups/backblaze | ||
state: directory | ||
owner: root | ||
|
||
- name: clone repo | ||
ansible.builtin.git: | ||
repo: https://github.com/s3fs-fuse/s3fs-fuse | ||
clone: yes | ||
dest: /tmp/s3fs-fuse | ||
|
||
- name: install s3fs | ||
shell: | | ||
cd /tmp/s3fs-fuse | ||
./autogen.sh | ||
./configure | ||
make | ||
make install | ||
- name: symlink binary | ||
ansible.builtin.file: | ||
src: /usr/local/bin/s3fs | ||
dest: /usr/bin | ||
state: link | ||
force: no | ||
ignore_errors: true | ||
|
||
- name: Create s3fs backblaze password file | ||
ansible.builtin.template: | ||
src: passwd-s3fs.j2 | ||
dest: /etc/passwd-s3fs | ||
mode: 0600 | ||
owner: root | ||
|
||
# clever bit to add a line/block to fstab file but use a template as a basis and add a marker. | ||
- name: Manage fstab file | ||
blockinfile: | ||
path: /etc/fstab | ||
block: "{{ lookup('template', 'baremetal_fstab_s3fs.j2') }}" | ||
marker: "# {mark} ANSIBLE MANAGED BLOCK for s3fs Mount" | ||
when: "'baremetal_hosts' in group_names" |
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 @@ | ||
s3fs#{{ backblaze.backblaze_bucket }} {{ backblaze.backblaze_dir }} fuse _netdev,use_xattr,umask=022,parallel_count=10,retries=100,dbglevel=debug,allow_other,use_path_request_style,url=https://s3.us-west-000.backblazeb2.com,nomixupload,nonempty 0 0 |
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,2 @@ | ||
{{ backblaze.backblaze_creds.key_id }}:{{ backblaze.backblaze_creds.app_key }} | ||
|