Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/ansible-mastodon-setup
An Ansible based setup for a Mastodon instance
https://github.com/ctron/ansible-mastodon-setup
ansible mastodon
Last synced: 4 days ago
JSON representation
An Ansible based setup for a Mastodon instance
- Host: GitHub
- URL: https://github.com/ctron/ansible-mastodon-setup
- Owner: ctron
- License: epl-2.0
- Created: 2018-06-19T15:10:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T09:58:15.000Z (8 months ago)
- Last Synced: 2024-05-02T06:15:02.499Z (6 months ago)
- Topics: ansible, mastodon
- Language: Jinja
- Size: 43.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Mastodon setup
In order to fetch dependencies for Ansible you need to run (also after updating the repository):
```shell
make roles
```Create an inventory file (`inventory.ini`):
```ini
[server]
159.69.3.194
```Then you can then run the playbook:
```shell
ansible-playbook -u root -i inventory.ini install.yml
```## Extra variables
You will most likely needs some additional variables set. You can do this with:
```shell
ansible-playbook -u root -i inventory.ini [email protected] install.yml
```And, have a file like:
~~~yml
---
mastodon_domain: dentrassi.de
mastodon_public_hostname: mastodon.dentrassi.demastodon_email_sender: [email protected]
mastodon_smtp_host: foo.bar.de
mastodon_smtp_port: 587
mastodon_smtp_password: bar-fooletsencrypt_email: [email protected]
# generate with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake secret
secret_key_base: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
# generate with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake secret
otp_secret: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
# generate both with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake mastodon:webpush:generate_vapid_key
vapid_private_key: ...
vapid_public_key: ...
~~~## Wrapper repository
It might make sense to use this repository, which contains only public information, as a
git submodule, so that you can store private data into a private repository.Then run the playbook like this:
```shell
ansible-playbook -u root -i ../inventory.ini --extra-vars=@../extra-vars.yaml install.yml
```Or, from the root of the wrapper repository:
```shell
ansible-playbook -u root -i inventory.ini [email protected] ansible-mastodon-setup/install.yml
```## Create your first user
Create a new user through the web-console, and then make it admin using:
```shell
su -s /bin/bash - mastodon
cd ~/live
env RAILS_ENV=production bin/tootctl accounts create \
alice \
--email [email protected] \
--confirmed \
--role admin
```## Performing an upgrade
* Switch to the new version in `roles/mastodon/defaults/main.yml`
* And then run the ansible update playbook
```shell
ansible-playbook -u root -i inventory.ini [email protected] ansible-mastodon-setup/update.yml
```
Or:```shell
ansible-playbook -u root -i ../inventory.ini --extra-vars=@../extra-vars.yaml update.yml
```