ansible-role-zammad/tasks/zammad.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2021-11-28 16:40:51 +01:00
- name: "zammad | Hole Zammad Repo"
2022-12-21 10:57:39 +01:00
ansible.builtin.git:
2021-07-28 18:28:22 +02:00
repo: "{{ zammad_repo }}"
dest: "{{ zammad_home }}"
version: stable
2022-12-21 10:57:39 +01:00
force: true
notify: restart zammad
2021-07-28 18:28:22 +02:00
2021-11-28 16:40:51 +01:00
- name: "zammad | Ändere Besitzrechte"
2022-12-21 10:57:39 +01:00
ansible.builtin.file:
2021-07-28 18:28:22 +02:00
path: "{{ zammad_home }}"
state: directory
2022-12-21 10:57:39 +01:00
recurse: true
2021-07-28 18:28:22 +02:00
owner: "{{ zammad_user }}"
group: "{{ zammad_user }}"
# https://github.com/zammad/zammad/issues/325
2021-11-28 16:40:51 +01:00
- name: "zammad | Wende plain-Text-Patch an"
2022-12-21 10:57:39 +01:00
ansible.builtin.patch:
2021-07-28 18:28:22 +02:00
src: plain-text.patch
dest: "{{ zammad_home }}/app/models/channel/email_build.rb"
2021-07-28 23:20:13 +02:00
2021-11-28 16:40:51 +01:00
- name: "zammad | Ermittle Ruby-Version"
2022-12-21 10:57:39 +01:00
ansible.builtin.command: cat "{{ zammad_home }}/.ruby-version"
2021-07-29 16:06:21 +02:00
register: ruby_version
2021-11-27 20:29:06 +01:00
changed_when: false
2021-11-28 16:40:51 +01:00
- name: "zammad | Kopiere Skripte"
2022-12-21 10:57:39 +01:00
ansible.builtin.template:
src: zammad-delete-customers.rb.j2
dest: "{{ local_scripts_dir }}/zammad-delete-customers.rb"
2022-12-21 10:57:39 +01:00
mode: 0644
2021-11-28 16:40:51 +01:00
- name: "zammad | Kopiere Updater"
2022-12-21 10:57:39 +01:00
ansible.builtin.template:
2021-11-27 20:29:06 +01:00
src: zammad-updater.j2
2021-10-30 01:35:25 +02:00
dest: "{{ local_scripts_dir }}/zammad-updater"
mode: 0755
2021-11-28 16:40:51 +01:00
- name: "zammad | Erstelle Alias"
2022-12-21 10:57:39 +01:00
ansible.builtin.lineinfile:
2021-11-28 16:40:51 +01:00
path: /root/.bashrc
line: 'alias zammad="cd {{ zammad_home }} && sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails"'