Lancache Docker (Ansible) - uthomelabs/guides GitHub Wiki

Setting up LanCache is easy enough doing it manually. But even easier if you make use of Ansible to automate a large portion of it. You should at least read through that guide to know what is happening.

Optional preparation

I prefer to setup my large storage drive first. I use LVM to make a large storage drive available. Once I have setup my large storage drive, I need to mount it where I want the CACHE_ROOT to live.

Next I'm going to manually create the directory where I want to mount that large drive and get that listed in /etc/fstab

Installation

Go clone the ansible playbook from https://github.com/uthomelabs/lancache-ansible-playbook.

On your host machine, get python installed along with pip.

Now install Ansible

pip install ansible

You should be ready roll now.

Edit inventory/all/all

Change 192.168.42.110 in both places to the static IP of your LanCache server.

Change cache_disk_size to the size slightly smaller than your large storage drive.

Change ansible_ssh_user and ubuntu_release as needed. The Ansible script for sure works on Ubuntu 20.04 focal fossa.

Now run the ansible command

ansible-playbook -i inventory/all -v app.yml --ask-become-pass

If all goes well, your lancache should be up and running in no time. Enjoy!