lemmy ansible scripts configured for Rocky Linux ARM
Find a file
2021-10-11 22:42:17 -04:00
examples Make the lemmy_version optional in the example. 2021-10-11 22:42:17 -04:00
templates Initial commit. 2021-10-08 18:29:01 -04:00
.gitignore Move password into domain folder. 2021-10-09 12:13:23 -04:00
ansible.cfg Initial commit. 2021-10-08 18:29:01 -04:00
lemmy.yml Add a default version. Fixes #1 2021-10-11 22:39:36 -04:00
lemmy_dev.yml Initial commit. 2021-10-08 18:29:01 -04:00
README.md Move password into domain folder. 2021-10-09 12:13:23 -04:00
uninstall.yml Get uninstall working 2021-10-09 11:34:44 -04:00
VERSION Add a default version. Fixes #1 2021-10-11 22:39:36 -04:00

Lemmy-Ansible

This provides an easy way to install Lemmy on any server.

Requirements

To run this ansible playbook, you need to:

  • Have a server / VPS where lemmy will run.
  • Configure a DNS A Record to point at your server's IP address.
  • Make sure you can ssh to it: ssh <your-user>@<your-domain>
  • Install Ansible on your local machine.

Install

Clone lemmy-docker-ansible-deploy:

git clone https://github.com/LemmyNet/lemmy-ansible.git
cd lemmy-ansible

Make a directory to hold your config:

mkdir inventory/host_vars/<your-domain>

Copy the sample configuration file:

cp examples/config.hjson inventory/host_vars/<your-domain>/config.hjson

Edit that file and change the config to your liking.

Copy the sample inventory hosts file:

cp examples/hosts inventory/hosts

Edit the inventory hosts file (inventory/hosts) to your liking.

Run the playbook:

ansible-playbook -i inventory/hosts lemmy.yml --become

If the command above fails, you may need to comment out this line In the ansible.cfg file:

interpreter_python=/usr/bin/python3

Migrating your existing install to use this deploy

  • Back up your existing docker folder.
  • Run docker-compose stop to stop lemmy.
  • Move your docker folders on the server to <lemmy_base_dir>/<your-domain>.
  • Copy your postgres password to inventory/host_vars/<your-domain>/passwords/postgres.
  • Follow the install guide above, making sure your config.hjson is the same as your backup.

Uninstall

ansible-playbook -i inventory/hosts uninstall.yml --become