1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Ansible_Project/ansistrano_tasks/configure.yml
2022-05-17 15:45:42 +02:00

16 lines
704 B
YAML

---
- name: "Copy sample"
ansible.builtin.copy:
src: "{{ ansistrano_release_path.stdout }}/includes/sys.config.sample.php"
dest: "{{ ansistrano_release_path.stdout }}/includes/sys.config.php"
remote_src: true
- name: "Setup DB"
ansible.builtin.lineinfile:
path: "{{ ansistrano_release_path.stdout }}/includes/sys.config.php"
regexp: "{{ item.regex }}"
line: "{{ item.line }}"
loop:
- {regex: "^define\\('DB_NAME', '.*'\\);$", line: "define('DB_NAME', '{{ db_name }}');"}
- {regex: "^define\\('DB_USER', '.*'\\);$", line: "define('DB_USER', '{{ db_user }}');"}
- {regex: "^define\\('DB_PASSWORD', '.*'\\);$", line: "define('DB_PASSWORD', '{{ db_password }}');"}