Korrigiere Fehler
This commit is contained in:
parent
e016c6e5a6
commit
5353c6ee06
4 changed files with 20 additions and 19 deletions
|
@ -16,6 +16,7 @@ zammad_database_name: zammad
|
||||||
zammad_database_password: "{{ lookup('password', '/tmp/zammad_database_pwd length=42 chars=ascii_letters,digits') }}"
|
zammad_database_password: "{{ lookup('password', '/tmp/zammad_database_pwd length=42 chars=ascii_letters,digits') }}"
|
||||||
zammad_database_user: zammad
|
zammad_database_user: zammad
|
||||||
zammad_database_configuration: "{{ zammad_home }}/config/database.yml"
|
zammad_database_configuration: "{{ zammad_home }}/config/database.yml"
|
||||||
|
zammad_env_file: /etc/zammad/zammad.env
|
||||||
zammad_home: /opt/zammad
|
zammad_home: /opt/zammad
|
||||||
zammad_host: support.sao
|
zammad_host: support.sao
|
||||||
zammad_log_file: zammad.log
|
zammad_log_file: zammad.log
|
||||||
|
|
|
@ -3,15 +3,11 @@
|
||||||
src: "systemd/{{ item }}.j2"
|
src: "systemd/{{ item }}.j2"
|
||||||
dest: "/etc/systemd/system/{{ item }}"
|
dest: "/etc/systemd/system/{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
|
- zammad.service
|
||||||
- zammad-rails.service
|
- zammad-rails.service
|
||||||
- zammad-scheduler.service
|
- zammad-scheduler.service
|
||||||
- zammad-websocket.service
|
- zammad-websocket.service
|
||||||
|
|
||||||
- name: "systemd: Kopiere Zammad-Service"
|
|
||||||
copy:
|
|
||||||
src: zammad.service
|
|
||||||
dest: /etc/systemd/system/zammad.service
|
|
||||||
|
|
||||||
- name: "systemd: Erstelle Konfigurationsverzeichnis"
|
- name: "systemd: Erstelle Konfigurationsverzeichnis"
|
||||||
file:
|
file:
|
||||||
path: /etc/zammad
|
path: /etc/zammad
|
||||||
|
@ -20,13 +16,12 @@
|
||||||
- name: "systemd: Kopiere Konfiguration"
|
- name: "systemd: Kopiere Konfiguration"
|
||||||
copy:
|
copy:
|
||||||
src: zammad.env
|
src: zammad.env
|
||||||
dest: /etc/zammad/zammad.env
|
dest: "{{ zammad_env_file }}"
|
||||||
force: no
|
force: no
|
||||||
|
|
||||||
- name: "systemd: Aktiviere Service"
|
- name: "systemd: Aktiviere Service"
|
||||||
systemd:
|
systemd:
|
||||||
|
name: zammad
|
||||||
enabled: yes
|
enabled: yes
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: started
|
state: started
|
||||||
name: zammad
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
- name: "zammad: Hole Zammad Repo"
|
- name: "zammad | Hole Zammad Repo"
|
||||||
git:
|
git:
|
||||||
repo: "{{ zammad_repo }}"
|
repo: "{{ zammad_repo }}"
|
||||||
dest: "{{ zammad_home }}"
|
dest: "{{ zammad_home }}"
|
||||||
version: stable
|
version: stable
|
||||||
force: yes
|
force: yes
|
||||||
|
|
||||||
- name: "zammad: Ändere Besitzrechte"
|
- name: "zammad | Ändere Besitzrechte"
|
||||||
file:
|
file:
|
||||||
path: "{{ zammad_home }}"
|
path: "{{ zammad_home }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
@ -14,34 +14,34 @@
|
||||||
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:
|
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"
|
||||||
|
|
||||||
# https://github.com/zammad/zammad/pull/3682
|
# https://github.com/zammad/zammad/pull/3682
|
||||||
- name: "zammad: Wende ldap-user-filter-Patch an"
|
- name: "zammad | Wende ldap-user-filter-Patch an"
|
||||||
patch:
|
patch:
|
||||||
src: ldap-user-filter.patch
|
src: ldap-user-filter.patch
|
||||||
dest: "{{ zammad_home }}/lib/ldap/user.rb"
|
dest: "{{ zammad_home }}/lib/ldap/user.rb"
|
||||||
|
|
||||||
- name: "zammad: Ermittle Ruby-Version"
|
- name: "zammad | Ermittle Ruby-Version"
|
||||||
shell: cat "{{ zammad_home }}/.ruby-version"
|
shell: 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:
|
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"
|
||||||
|
|
||||||
- name: "zammad: Kopiere Updater"
|
- name: "zammad | Kopiere Updater"
|
||||||
template:
|
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: Richte cron ein"
|
- name: "zammad | Richte cron ein"
|
||||||
cron:
|
cron:
|
||||||
cron_file: "{{ cron_file }}"
|
cron_file: "{{ cron_file }}"
|
||||||
user: "{{ zammad_user }}"
|
user: "{{ zammad_user }}"
|
||||||
|
@ -50,3 +50,8 @@
|
||||||
hour: "1"
|
hour: "1"
|
||||||
day: "1"
|
day: "1"
|
||||||
job: "cd {{ zammad_home }} && RAILS_ENV=production rbenv exec rails r {{ local_scripts_dir }}/zammad-delete-customers.rb"
|
job: "cd {{ zammad_home }} && RAILS_ENV=production rbenv exec rails r {{ local_scripts_dir }}/zammad-delete-customers.rb"
|
||||||
|
|
||||||
|
- name: "zammad | Erstelle Alias"
|
||||||
|
lineinfile:
|
||||||
|
path: /root/.bashrc
|
||||||
|
line: 'alias zammad="cd {{ zammad_home }} && sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails"'
|
||||||
|
|
|
@ -8,9 +8,9 @@ Wants=zammad-scheduler.service
|
||||||
Wants=zammad-websocket.service
|
Wants=zammad-websocket.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/zammad/zammad.env
|
EnvironmentFile={{ zammad_env_file }}
|
||||||
User=zammad
|
User={{ zammad_user }}
|
||||||
Group=zammad
|
Group={{ zammad_user }}
|
||||||
Restart=always
|
Restart=always
|
||||||
ExecStart=/bin/sleep infinity
|
ExecStart=/bin/sleep infinity
|
||||||
|
|
Loading…
Reference in a new issue