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

[TASK] Allow search replace in db content for Neos

parent 3e15d5d2
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
CHANGELOG
CHANGELOG
=========
=========


3.0.8
-----

  - [TASK] Allow search replace in db content for Neos

3.0.7
3.0.7
-----
-----


+2 −2
Original line number Original line Diff line number Diff line
@@ -173,10 +173,10 @@ To do that, create a file called `main.yml` in `ansible/roles/database/defaults/
replacement:
replacement:
  1:
  1:
    search: live-domain.com
    search: live-domain.com
    replace: local-site:8080
    replace: local-domain
  2:
  2:
    search: live-domain2.net
    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.
`replacement`, `search` and `replace` are keyword but for `1` and `2` you can use any strings to define your content type.
+4 −0
Original line number Original line Diff line number Diff line
@@ -33,3 +33,7 @@


  - name: Sync remote database dump to local temp
  - 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"
    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({})