stop lemmy before updating #6

Merged
meaz merged 5 commits from stop_systemd into staging 2024-07-17 18:06:13 +02:00
2 changed files with 14 additions and 0 deletions

View file

@ -35,6 +35,7 @@ You can use several tags when you deploy:
## CHANGELOG ## CHANGELOG
- **23.03.2024** - Stop lemmy service before updating
- **24.12.2023** - Add purge task - **24.12.2023** - Add purge task
- **02.12.2023** - Role update - **02.12.2023** - Role update
- **12.11.2022** - Role creation - **12.11.2022** - Role creation

View file

@ -71,6 +71,19 @@
tags: tags:
- backend - backend
- name: '[BACKEND] - Check if Backend systemd is active'
systemd:
name: lemmy
state: started
ignore_errors: yes
register: systemd_status
- name: '[BACKEND] - Stop Backend systemd if it exists and is active'
systemd:
name: lemmy
state: stopped
when: systemd_status.status == 'started'
- name: '[BACKEND] - Install Lemmy server' - name: '[BACKEND] - Install Lemmy server'
shell: '. /etc/profile && sudo -u {{ lemmy_username }} /home/{{ lemmy_username }}/.cargo/bin/cargo build --release' shell: '. /etc/profile && sudo -u {{ lemmy_username }} /home/{{ lemmy_username }}/.cargo/bin/cargo build --release'
args: args: