1 Commits

Author SHA1 Message Date
370e5051cb Run migrations if the container changed 2026-09-15 21:34:43 +03:00
3 changed files with 12 additions and 2 deletions

View File

@@ -6,3 +6,9 @@
ansible.builtin.systemd_service:
daemon_reload: true
scope: user
- name: Run mastodon database migrations
ansible.builtin.command:
cmd: podman exec mastodon rails db:migrate
register: mastodon_db_migrate
changed_when: mastodon_db_migrate.stdout | length > 0

View File

@@ -10,4 +10,6 @@
state: present
src: "{{ mastodon_quadlet_tmp.path }}/sidekiq.container"
reload_systemd: false
notify: Reload systemd user units
notify:
- Reload systemd user units
- Run mastodon database migrations

View File

@@ -10,4 +10,6 @@
state: present
src: "{{ mastodon_quadlet_tmp.path }}/mastodon.container"
reload_systemd: false
notify: Reload systemd user units
notify:
- Reload systemd user units
- Run mastodon database migrations