Commit 4971ba95 authored by Visay Keo's avatar Visay Keo

[TASK] Allow search replace in db content for Neos

parent 3e15d5d2
CHANGELOG
=========
3.0.8
-----
- [TASK] Allow search replace in db content for Neos
3.0.7
-----
......
......@@ -173,10 +173,10 @@ To do that, create a file called `main.yml` in `ansible/roles/database/defaults/
replacement:
1:
search: live-domain.com
replace: local-site:8080
replace: local-domain
2:
search: live-domain2.net
replace: domain2.local-site:8080
replace: domain2.local-domain
```
`replacement`, `search` and `replace` are keyword but for `1` and `2` you can use any strings to define your content type.
......
......@@ -33,3 +33,7 @@
- name: Sync remote database dump to local temp
synchronize: mode=pull src="/{{ remote_dump }}/{{ db_name.stdout }}.sql" dest="/tmp/{{ ssh_user }}/db_dump.sql"
- name: Search and replace content in database dump
local_action: replace dest="/tmp/{{ ssh_user }}/db_dump.sql" regexp="{{ item.value.search }}" replace="{{ item.value.replace }}"
with_dict: replacement | default({})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment