forked from galaxyproject/ansible-cvmfs
-
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.
Merge pull request #2 from bedroge/s3
Add S3 storage support
- Loading branch information
Showing
7 changed files
with
91 additions
and
24 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
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,15 +1,42 @@ | ||
--- | ||
- name: Create /srv filesystem | ||
community.general.system.filesystem: | ||
dev: "{{ cvmfs_srv_device }}" | ||
force: false | ||
fstype: "{{ cvmfs_srv_fstype | default('ext4') }}" | ||
when: cvmfs_srv_device is defined | ||
|
||
- name: Mount /srv | ||
ansible.posix.mount: | ||
name: "{{ cvmfs_srv_mount }}" | ||
src: "{{ cvmfs_srv_device }}" | ||
fstype: "{{ cvmfs_srv_fstype | default('ext4') }}" | ||
state: mounted | ||
when: cvmfs_srv_device is defined | ||
- name: Disk storage tasks | ||
block: | ||
- name: Create /srv filesystem | ||
community.general.system.filesystem: | ||
dev: "{{ cvmfs_srv_device }}" | ||
force: false | ||
fstype: "{{ cvmfs_srv_fstype | default('ext4') }}" | ||
|
||
- name: Mount /srv | ||
ansible.posix.mount: | ||
name: "{{ cvmfs_srv_mount }}" | ||
src: "{{ cvmfs_srv_device }}" | ||
fstype: "{{ cvmfs_srv_fstype | default('ext4') }}" | ||
state: mounted | ||
|
||
when: cvmfs_storage == 'disk' and cvmfs_srv_device is defined | ||
|
||
- name: S3 storage tasks | ||
block: | ||
|
||
- name: Create s3.conf | ||
template: | ||
src: s3.conf.j2 | ||
dest: /etc/cvmfs/s3.conf | ||
mode: "{{ cvmfs_s3_config_mode | default('0600') }}" | ||
owner: root | ||
group: "{{ cvmfs_s3_config_group | default('root') }}" | ||
|
||
- name: Set ACL for CVMFS repository owners to access s3.conf | ||
acl: | ||
path: /etc/cvmfs/s3.conf | ||
entity: "{{ item.owner }}" | ||
etype: user | ||
permissions: r | ||
state: present | ||
loop: "{{ cvmfs_repositories }}" | ||
when: "cvmfs_set_s3_config_acl and item.owner != 'root'" | ||
loop_control: | ||
label: "{{ item.repository }}: {{ item.owner }}" | ||
|
||
when: cvmfs_storage == 's3' |
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,6 @@ | ||
# | ||
# This file is managed by Ansible. ALL CHANGES WILL BE OVERWRITTEN. | ||
# | ||
{% for opt in (cvmfs_s3_config | dict2items) %} | ||
{{ opt.key }}={{ opt.value }} | ||
{% endfor %} |
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