Hello All,
I am trying to sync all files and directories between two directories however for some reason, delete option is not working. Following is my task, this works properly except when some directory is deleted fro source, the same is not deleted in destination even thought both delete: yes and recursive: true are set. Kindly suggest.
`
- name: “STEP 4: Synchronization of Updates from Repo to deploymet_apps directory”
synchronize:
src: “{{ item }}”
dest: “/home/DS/ads.anksharma/deployment-apps”
delete: yes
recursive: true
with_items: “{{ Files }}”
delegate_to: localhost
`
Output:
`
TASK [STEP 4: Synchronization of Updates from Repo to deployment_apps directory] *****************************************************************************
ok: [localhost → localhost] => (item=/root/13532/deployment-apps/app_demoapp)
ok: [localhost → localhost] => (item=/root/13532/deployment-apps/app_SPLWindowsinstall)
ok: [localhost → localhost] => (item=/root/13532/deployment-apps/app_test)
ok: [localhost → localhost] => (item=/root/13532/deployment-apps/app_SPLLinuxinstall)
PLAY RECAP **************************************************************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
`