Commit 129fcd4a authored by Visay Keo's avatar Visay Keo

Merge branch 'ansible-2.2.2.0' into 'master'

[TASK] Upgrade rsync syntax for ansible 2.2

See merge request !6
parents 0bbd4ef7 e2d7a45b
...@@ -4,6 +4,12 @@ CHANGELOG ...@@ -4,6 +4,12 @@ CHANGELOG
3.1-dev 3.1-dev
------- -------
-
3.1.2
-----
- [TASK] Update to support ansible 2.2
- [BUGFIX] Fix syncontent error with Neos3 on Read remote database info - [BUGFIX] Fix syncontent error with Neos3 on Read remote database info
3.1.1 3.1.1
......
...@@ -9,7 +9,7 @@ This is requires that your Flow Framework / Neos CMS installation is configured ...@@ -9,7 +9,7 @@ This is requires that your Flow Framework / Neos CMS installation is configured
(see https://github.com/Sebobo/Shel.DockerFlow) or your TYPO3 installation is configured to run with `dockertypo3` (see https://github.com/Sebobo/Shel.DockerFlow) or your TYPO3 installation is configured to run with `dockertypo3`
package (see https://github.com/visay/DockerTYPO3) and all containers are started before executing the sync. package (see https://github.com/visay/DockerTYPO3) and all containers are started before executing the sync.
Ansible is needed on your local machine. Ansible is needed on your local machine (support from 1.9 up to 2.2).
## Installation ## Installation
......
...@@ -36,4 +36,4 @@ ...@@ -36,4 +36,4 @@
- name: Search and replace content in database dump - 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 }}" local_action: replace dest="/tmp/{{ ssh_user }}/db_dump.sql" regexp="{{ item.value.search }}" replace="{{ item.value.replace }}"
with_dict: replacement | default({}) with_dict: "{{ replacement | default({}) }}"
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- name: Search and replace content in database dump - 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 }}" local_action: replace dest="/tmp/{{ ssh_user }}/db_dump.sql" regexp="{{ item.value.search }}" replace="{{ item.value.replace }}"
with_dict: replacement | default({}) with_dict: "{{ replacement | default({}) }}"
when: not from_cache|bool when: not from_cache|bool
- name: Drop local database - name: Drop local database
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
# tasks file for rsync # tasks file for rsync
- name: Make sure local temp directory exists - name: Make sure local temp directory exists
local_action: file path="/tmp/{{ ssh_user }}/{{ item }}" state=directory local_action: file path="{{ item[0] }}/{{ item[1] }}" state=directory
with_items: "{{ data_dir.flow }}" with_nested:
- [ "/tmp/{{ ssh_user }}", "{{ local_path }}" ]
- "{{ data_dir.flow }}"
- name: Sync flow persistent data from remote server to local temp - name: Sync flow persistent data from remote server to local temp
synchronize: mode=pull synchronize: mode=pull
...@@ -14,7 +16,6 @@ ...@@ -14,7 +16,6 @@
when: not from_cache|bool when: not from_cache|bool
- name: Sync flow persistent data from local temp to working directory - name: Sync flow persistent data from local temp to working directory
local_action: synchronize src="/tmp/{{ ssh_user }}/{{ item }}" local_action: shell rsync --delay-updates -F -z --delete-after -a --out-format='<<CHANGED>>%i %n%L' \
dest="{{ local_path }}/{{ item }}" /tmp/{{ ssh_user }}/{{ item }} {{ local_path }}/{{ item }}
delete=yes
with_items: "{{ data_dir.flow }}" with_items: "{{ data_dir.flow }}"
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
# tasks file for rsync # tasks file for rsync
- name: Make sure local temp directory exists - name: Make sure local temp directory exists
local_action: file path="/tmp/{{ ssh_user }}/{{ item }}" state=directory local_action: file path="{{ item[0] }}/{{ item[1] }}" state=directory
with_items: "{{ data_dir.typo3 }}" with_nested:
- [ "/tmp/{{ ssh_user }}", "{{ local_path }}" ]
- "{{ data_dir.typo3 }}"
- name: Sync typo3 data from remote server to local temp - name: Sync typo3 data from remote server to local temp
synchronize: mode=pull synchronize: mode=pull
...@@ -15,8 +17,7 @@ ...@@ -15,8 +17,7 @@
when: not from_cache|bool when: not from_cache|bool
- name: Sync typo3 data from local temp to working directory - name: Sync typo3 data from local temp to working directory
local_action: synchronize src="/tmp/{{ ssh_user }}/{{ item }}" local_action: shell rsync --delay-updates -F -z --delete-after -a --out-format='<<CHANGED>>%i %n%L' \
dest="{{ local_path }}/{{ item }}" --exclude=.gitkeep --exclude=_temp_ --exclude=_processed_ \
delete=yes /tmp/{{ ssh_user }}/{{ item }} {{ local_path }}/{{ item }}
rsync_opts="--exclude=.gitkeep --exclude=_temp_ --exclude=_processed_"
with_items: "{{ data_dir.typo3 }}" with_items: "{{ data_dir.typo3 }}"
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