ansible-role-zammad/tasks/installation.yml

32 lines
895 B
YAML
Raw Permalink Normal View History

2023-05-19 11:59:02 +02:00
---
- name: "Zammad | Fix safedir warning"
ansible.builtin.command:
cmd: "git config --global --add safe.directory {{ zammad_home }}"
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 }}"
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
check_mode: false
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"'