zammad: Starte nach Aktualisierung neu

This commit is contained in:
phil 2022-12-21 10:57:39 +01:00
parent 8185a8a5e1
commit 30229c1d56
2 changed files with 20 additions and 13 deletions

View file

@ -1,21 +1,26 @@
---
- name: reload monit
service:
ansible.builtin.service:
name: monit
state: reloaded
- name: reload nginx
service:
ansible.builtin.service:
name: nginx
state: reloaded
- name: reload reverse_proxy
service:
ansible.builtin.service:
name: nginx
state: reloaded
delegate_to: "{{ gateway_host }}"
- name: reload rsyslog
service:
ansible.builtin.service:
name: rsyslog
state: reloaded
- name: restart zammad
ansible.builtin.systemd:
name: zammad*
state: restarted

View file

@ -1,41 +1,43 @@
- name: "zammad | Hole Zammad Repo"
git:
ansible.builtin.git:
repo: "{{ zammad_repo }}"
dest: "{{ zammad_home }}"
version: stable
force: yes
force: true
notify: restart zammad
- name: "zammad | Ändere Besitzrechte"
file:
ansible.builtin.file:
path: "{{ zammad_home }}"
state: directory
recurse: yes
recurse: true
owner: "{{ zammad_user }}"
group: "{{ zammad_user }}"
# https://github.com/zammad/zammad/issues/325
- name: "zammad | Wende plain-Text-Patch an"
patch:
ansible.builtin.patch:
src: plain-text.patch
dest: "{{ zammad_home }}/app/models/channel/email_build.rb"
- name: "zammad | Ermittle Ruby-Version"
shell: cat "{{ zammad_home }}/.ruby-version"
ansible.builtin.command: cat "{{ zammad_home }}/.ruby-version"
register: ruby_version
changed_when: false
- name: "zammad | Kopiere Skripte"
template:
ansible.builtin.template:
src: zammad-delete-customers.rb.j2
dest: "{{ local_scripts_dir }}/zammad-delete-customers.rb"
mode: 0644
- name: "zammad | Kopiere Updater"
template:
ansible.builtin.template:
src: zammad-updater.j2
dest: "{{ local_scripts_dir }}/zammad-updater"
mode: 0755
- name: "zammad | Erstelle Alias"
lineinfile:
ansible.builtin.lineinfile:
path: /root/.bashrc
line: 'alias zammad="cd {{ zammad_home }} && sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails"'