mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-18 00:06:05 +02:00
Added administrator account creation for mastodon
This commit is contained in:
13
roles/docker-mastodon/tasks/create-administrator.yml
Normal file
13
roles/docker-mastodon/tasks/create-administrator.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Routines to create the administrator account
|
||||
# @see https://chatgpt.com/share/67b9b12c-064c-800f-9354-8e42e6459764
|
||||
|
||||
- name: Remove line containing "- administrator" from config/settings.yml to allow creating administrator account
|
||||
shell: docker compose exec -u root web sed -i '/- administrator/d' config/settings.yml
|
||||
when: administrator_username == "administrator"
|
||||
|
||||
- name: Create admin account via tootctl
|
||||
shell: 'docker compose exec -u root web bash -c "RAILS_ENV=production bin/tootctl accounts create {{administrator_username}} --email {{administrator_email}} --confirmed --role Owner"'
|
||||
ignore_errors: true
|
||||
|
||||
- name: Approve the administrator account in Mastodon
|
||||
shell: docker compose exec -u root web bash -c "RAILS_ENV=production bin/tootctl accounts modify {{administrator_username}} --approve"
|
Reference in New Issue
Block a user