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 - name: reload monit
service: ansible.builtin.service:
name: monit name: monit
state: reloaded state: reloaded
- name: reload nginx - name: reload nginx
service: ansible.builtin.service:
name: nginx name: nginx
state: reloaded state: reloaded
- name: reload reverse_proxy - name: reload reverse_proxy
service: ansible.builtin.service:
name: nginx name: nginx
state: reloaded state: reloaded
delegate_to: "{{ gateway_host }}" delegate_to: "{{ gateway_host }}"
- name: reload rsyslog - name: reload rsyslog
service: ansible.builtin.service:
name: rsyslog name: rsyslog
state: reloaded state: reloaded
- name: restart zammad
ansible.builtin.systemd:
name: zammad*
state: restarted

View file

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