diff --git a/README.md b/README.md index c25350c..a98a2bd 100644 --- a/README.md +++ b/README.md @@ -13,54 +13,58 @@ To run this ansible playbook, you need to: ## Install -Clone this repo: +1. Clone this repo: -``` -git clone https://github.com/LemmyNet/lemmy-ansible.git -cd lemmy-ansible -``` + ``` + git clone https://github.com/LemmyNet/lemmy-ansible.git + cd lemmy-ansible + ``` -Make a directory to hold your config: +2. Make a directory to hold your config: -`mkdir -p inventory/host_vars/` + `mkdir -p inventory/host_vars/` -Copy the sample configuration file: +3. Copy the sample configuration file: -`cp examples/config.hjson inventory/host_vars//config.hjson` + `cp examples/config.hjson inventory/host_vars//config.hjson` -Edit that file and change the config to your liking. Note: **Do not edit anything inside the {{ }} braces.** + Edit that file and change the config to your liking. Note: **Do not edit anything inside the {{ }} braces.** -[Here are all the config options.](https://join-lemmy.org/docs/en/administration/configuration.html#full-config-with-default-values) + [Here are all the config options.](https://join-lemmy.org/docs/en/administration/configuration.html#full-config-with-default-values) -Copy the sample inventory hosts file: +4. Copy the sample inventory hosts file: -`cp examples/hosts inventory/hosts` + `cp examples/hosts inventory/hosts` -Edit the inventory hosts file (inventory/hosts) to your liking. + Edit the inventory hosts file (inventory/hosts) to your liking. -Copy the sample postgresql.conf +5. Copy the sample postgresql.conf -`cp examples/customPostgresql.conf inventory/host_vars//customPostgresql.conf` + `cp examples/customPostgresql.conf inventory/host_vars//customPostgresql.conf` -You can use [the PGTune tool](https://pgtune.leopard.in.ua) to tune your postgres to meet your server memory and CPU. + You can use [the PGTune tool](https://pgtune.leopard.in.ua) to tune your postgres to meet your server memory and CPU. -Run the playbook: +6. Run the playbook: -`ansible-playbook -i inventory/hosts lemmy.yml` + `ansible-playbook -i inventory/hosts lemmy.yml` -_Note_: if you are not the root user or don't have password-less sudo, use this command: + _Note_: if you are not the root user or don't have password-less sudo, use this command: -`ansible-playbook -i inventory/hosts lemmy.yml --become --ask-become-pass` + `ansible-playbook -i inventory/hosts lemmy.yml --become --ask-become-pass` -_Note_: if you haven't set up ssh keys, and ssh using a password, use the command: + _Note_: if you haven't set up ssh keys[^1], and ssh using a password, use the command: -`ansible-playbook -i inventory/hosts lemmy.yml --become --ask-pass --ask-become-pass` + `ansible-playbook -i inventory/hosts lemmy.yml --become --ask-pass --ask-become-pass` -[Full ansible command-line docs](https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html) + [Full ansible command-line docs](https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html) + + If the command above fails, you may need to comment out this line In the ansible.cfg file: + + `interpreter_python=/usr/bin/python3` + +[^1]: To create an ssh key pair with your host environment, you can follow the [instructions here](https://www.ssh.com/academy/ssh/keygen#copying-the-public-key-to-the-server), and then copy the key to your host server. -If the command above fails, you may need to comment out this line In the ansible.cfg file: -`interpreter_python=/usr/bin/python3` ## Upgrading