{"id":19230702,"url":"https://github.com/ctron/ansible-mastodon-setup","last_synced_at":"2025-07-06T18:03:47.423Z","repository":{"id":140051880,"uuid":"137908461","full_name":"ctron/ansible-mastodon-setup","owner":"ctron","description":"An Ansible based setup for a Mastodon instance","archived":false,"fork":false,"pushed_at":"2024-03-27T09:58:15.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T06:15:02.499Z","etag":null,"topics":["ansible","mastodon"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-19T15:10:27.000Z","updated_at":"2023-07-25T14:17:56.000Z","dependencies_parsed_at":"2023-07-07T10:33:29.225Z","dependency_job_id":"a585a869-a23d-4ba2-94ee-f9b3b74d6a45","html_url":"https://github.com/ctron/ansible-mastodon-setup","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":"0.32608695652173914","last_synced_commit":"e7b8b72cd17bf28ea4f99088c5777362ef56c8d9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fansible-mastodon-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fansible-mastodon-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fansible-mastodon-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctron%2Fansible-mastodon-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctron","download_url":"https://codeload.github.com/ctron/ansible-mastodon-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240102166,"owners_count":19747958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","mastodon"],"created_at":"2024-11-09T15:40:12.899Z","updated_at":"2025-02-23T11:17:56.675Z","avatar_url":"https://github.com/ctron.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Mastodon setup\n\nIn order to fetch dependencies for Ansible you need to run (also after updating the repository):\n\n```shell\nmake roles\n```\n\nCreate an inventory file (`inventory.ini`):\n\n```ini\n[server]\n159.69.3.194\n```\n\nThen you can then run the playbook:\n\n```shell\nansible-playbook -u root -i inventory.ini install.yml\n```\n\n## Extra variables\n\nYou will most likely needs some additional variables set. You can do this with:\n\n```shell\nansible-playbook -u root -i inventory.ini --extra-vars=@extra-vars.yaml install.yml\n```\n\nAnd, have a file like:\n\n~~~yml\n---\nmastodon_domain: dentrassi.de\nmastodon_public_hostname: mastodon.dentrassi.de\n\nmastodon_email_sender: mastodon@dentrassi.de\nmastodon_smtp_host: foo.bar.de\nmastodon_smtp_port: 587\nmastodon_smtp_password: bar-foo \n\nletsencrypt_email: my@domain.org\n\n# generate with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake secret\nsecret_key_base: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n# generate with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake secret\notp_secret: 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef\n# generate both with: podman run --rm -ti docker.io/tootsuite/mastodon:v3.5.0 bundle exec rake mastodon:webpush:generate_vapid_key \nvapid_private_key: ...\nvapid_public_key: ...\n~~~\n\n## Wrapper repository\n\nIt might make sense to use this repository, which contains only public information, as a\ngit submodule, so that you can store private data into a private repository.\n\nThen run the playbook like this:\n\n```shell\nansible-playbook -u root -i ../inventory.ini --extra-vars=@../extra-vars.yaml install.yml\n```\n\nOr, from the root of the wrapper repository:\n```shell\nansible-playbook -u root -i inventory.ini --extra-vars=@extra-vars.yaml ansible-mastodon-setup/install.yml\n```\n\n## Create your first user\n\nCreate a new user through the web-console, and then make it admin using:\n\n```shell\nsu -s /bin/bash - mastodon\ncd ~/live\nenv RAILS_ENV=production bin/tootctl accounts create \\\n  alice \\\n  --email alice@example.com \\\n  --confirmed \\\n  --role admin\n```\n\n## Performing an upgrade\n\n  * Switch to the new version in `roles/mastodon/defaults/main.yml`\n  * And then run the ansible update playbook\n  \n    ```shell\n    ansible-playbook -u root -i inventory.ini --extra-vars=@extra-vars.yaml ansible-mastodon-setup/update.yml \n    ```\n    \n    Or:\n\n    ```shell\n    ansible-playbook -u root -i ../inventory.ini --extra-vars=@../extra-vars.yaml update.yml \n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fansible-mastodon-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctron%2Fansible-mastodon-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctron%2Fansible-mastodon-setup/lists"}