19 lines
836 B
YAML
19 lines
836 B
YAML
---
|
|
|
|
- name: Create config.local.php
|
|
ansible.builtin.template:
|
|
src: config.local.php.j2
|
|
dest: "{{ postfixadmin_installation_prefix }}/postfixadmin-{{ postfixadmin_version }}/config.local.php"
|
|
owner: root
|
|
group: www-data
|
|
mode: "0640"
|
|
|
|
- name: Call setup.php to run database migrations
|
|
ansible.builtin.uri:
|
|
url: "{{ postfixadmin_bootstrap_base_url }}/setup.php"
|
|
return_content: true
|
|
register: postfixadmin_register_setup_upgrade
|
|
changed_when:
|
|
- "'Database is up to date' not in postfixadmin_register_setup_upgrade.content"
|
|
- "' done' in postfixadmin_register_setup_upgrade.content"
|
|
failed_when: '"Something went wrong while trying to apply database updates" in postfixadmin_register_setup_upgrade.content or postfixadmin_register_setup_upgrade.status != 200' # noqa yaml[line-length]
|