Skip to content

Instantly share code, notes, and snippets.

@apeckham
Created October 15, 2014 01:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save apeckham/dea93a417e8f57855a79 to your computer and use it in GitHub Desktop.
Save apeckham/dea93a417e8f57855a79 to your computer and use it in GitHub Desktop.
---
- 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
{{ access_key_id }}:{{ secret_access_key }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment