mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 19:00:27 -07:00
Initial commit of gcsfuse role
This commit is contained in:
parent
282f8e3b82
commit
b8b07c188d
6 changed files with 66 additions and 0 deletions
31
roles/gcsfuse/README.md
Normal file
31
roles/gcsfuse/README.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# gcsfuse
|
||||||
|
|
||||||
|
This role configures the gcsfuse repository, and installs gcsfuse on your host.
|
||||||
|
gcsfuse is a user-space file system for working with
|
||||||
|
[Google Cloud Storage](https://cloud.google.com/storage/).
|
||||||
|
|
||||||
|
**Important:** You should run gcsfuse as the user who will be using the file
|
||||||
|
system, not as the root user. Do not use sudo either.
|
||||||
|
|
||||||
|
After installed you can use it to mount by command:
|
||||||
|
`gcsfuse bucket-name /mount/point`
|
||||||
|
|
||||||
|
## Example Playbook
|
||||||
|
|
||||||
|
Including an example of how to use your role (for instance, with variables
|
||||||
|
passed in as parameters) is always nice for users too:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- hosts: servers
|
||||||
|
tasks:
|
||||||
|
- include_role:
|
||||||
|
name: google.cloud.gcsfuse
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
GPLv3
|
||||||
|
|
||||||
|
## Author Information
|
||||||
|
|
||||||
|
[ericsysmin](https://ericsysmin.com)
|
2
roles/gcsfuse/defaults/main.yml
Normal file
2
roles/gcsfuse/defaults/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
# defaults file for google.cloud.gcsfuse
|
2
roles/gcsfuse/handlers/main.yml
Normal file
2
roles/gcsfuse/handlers/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
# handlers file for google.cloud.gcsfuse
|
25
roles/gcsfuse/tasks/debian.yml
Normal file
25
roles/gcsfuse/tasks/debian.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
- name: gcsfuse | Ensure gpg is installed
|
||||||
|
apt: name=gnupg
|
||||||
|
register: task_result
|
||||||
|
until: task_result is success
|
||||||
|
retries: 10
|
||||||
|
delay: 2
|
||||||
|
|
||||||
|
- name: gcsfuse | Add an apt signing key
|
||||||
|
apt_key:
|
||||||
|
url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: gcsfuse | Add the apt repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://packages.cloud.google.com/apt gcsfuse-{{ ansible_distribution_release }} main
|
||||||
|
state: present
|
||||||
|
filename: gcsfuse
|
||||||
|
|
||||||
|
- name: gcsfuse | Install gcsfuse
|
||||||
|
apt: name=gcsfuse update_cache=yes
|
||||||
|
register: task_result
|
||||||
|
until: task_result is success
|
||||||
|
retries: 10
|
||||||
|
delay: 2
|
4
roles/gcsfuse/tasks/main.yml
Normal file
4
roles/gcsfuse/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
# tasks file for google.cloud.gcsfuse
|
||||||
|
|
||||||
|
- include_tasks: "{{ ansible_os_family|lower }}.yml"
|
2
roles/gcsfuse/vars/main.yml
Normal file
2
roles/gcsfuse/vars/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
# vars file for google.cloud.gcsfuse
|
Loading…
Add table
Reference in a new issue