Created
October 15, 2014 01:29
-
-
Save apeckham/dea93a417e8f57855a79 to your computer and use it in GitHub Desktop.
ansible role to mount s3 buckets on ec2 -- http://juliensimon.blogspot.com/2013/08/howto-aws-mount-s3-buckets-from-linux.html
This file contains hidden or 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
--- | |
- include_vars: secrets.yml | |
- apt: pkg=fuse state=absent | |
- apt: pkg={{ item }} state=present update_cache=yes | |
with_items: | |
- build-essential | |
- libcurl4-openssl-dev | |
- libxml2-dev | |
- mime-support | |
- get_url: url=http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.9.3/fuse-2.9.3.tar.gz dest=/usr/src/fuse.tar.gz | |
- command: tar xzf fuse.tar.gz chdir=/usr/src creates=fuse-2.9.3 | |
- command: ./configure --prefix=/usr/local chdir=/usr/src/fuse-2.9.3 creates=config.status | |
- command: make chdir=/usr/src/fuse-2.9.3 creates=lib/fuse.o | |
- command: make install chdir=/usr/src/fuse-2.9.3 creates=/usr/local/lib/libfuse.so | |
- command: env PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ldconfig | |
- command: modprobe fuse | |
- get_url: url=https://s3fs.googlecode.com/files/s3fs-1.74.tar.gz dest=/usr/src/s3fs.tar.gz | |
- command: tar xvf s3fs.tar.gz chdir=/usr/src creates=s3fs-1.74 | |
- command: ./configure --prefix=/usr/local chdir=/usr/src/s3fs-1.74 creates=config.status | |
- command: make chdir=/usr/src/s3fs-1.74 creates=src/s3fs | |
- command: make install chdir=/usr/src/s3fs-1.74 creates=/usr/local/bin/s3fs | |
- template: src=passwd-s3fs.j2 dest=/root/.passwd-s3fs mode=0600 | |
- file: path=/mnt/s3 state=directory mode=0777 | |
- file: path=/tmp/cache state=directory mode=0777 | |
- command: s3fs -o use_cache=/tmp/cache {{ bucket }} /mnt/s3 |
This file contains hidden or 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
{{ access_key_id }}:{{ secret_access_key }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment