- Abhängigkeit auf Erstellung der Datenbank
- Füge weitere Tags ein
This commit is contained in:
parent
3ede350f4d
commit
6a1f2228e0
2 changed files with 12 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
|||
become: true
|
||||
become_user: postgres
|
||||
delegate_to: "{{ database_host }}"
|
||||
register: database_created
|
||||
|
||||
- name: "database: Benutzer einrichten"
|
||||
postgresql_user:
|
||||
|
@ -29,6 +30,14 @@
|
|||
register: unused_disable
|
||||
failed_when: "unused_disable is failed and ('find' not in unused_disable.msg and 'found' not in unused_disable.msg)"
|
||||
|
||||
- name: "database: Befülle Datenbank"
|
||||
shell: "RAILS_ENV=production rbenv exec bundle exec rake db:create"
|
||||
args:
|
||||
chdir: "{{ zammad_home }}"
|
||||
become: true
|
||||
become_user: "{{ zammad_user }}"
|
||||
when: database_created.changed
|
||||
|
||||
- name: "database: Führe Migrationen aus"
|
||||
shell: "RAILS_ENV=production rbenv exec bundle exec rake db:migrate"
|
||||
args:
|
||||
|
@ -42,7 +51,7 @@
|
|||
chdir: "{{ zammad_home }}"
|
||||
become: true
|
||||
become_user: "{{ zammad_user }}"
|
||||
when: zammad_database_configured.stat.exists == False
|
||||
when: database_created.changed
|
||||
|
||||
- name: "database: Precompile Assets"
|
||||
shell: "RAILS_ENV=production rbenv exec bundle exec rake assets:precompile"
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
- name: "Prüfe vorhandene Datenbank-Konfiguration"
|
||||
stat:
|
||||
path: "{{ zammad_database_configuration }}"
|
||||
register: zammad_database_configured
|
||||
|
||||
- import_tasks: packages.yml
|
||||
- import_tasks: locales.yml
|
||||
- import_tasks: user.yml
|
||||
- import_tasks: zammad.yml
|
||||
tags: zammad
|
||||
- import_tasks: ruby.yml
|
||||
tags: ruby
|
||||
- import_tasks: database.yml
|
||||
tags: database
|
||||
- import_tasks: syslog.yml
|
||||
- import_tasks: webserver.yml
|
||||
- import_tasks: systemd.yml
|
||||
|
|
Loading…
Reference in a new issue