Why is ansible synchronize module synchronizing my playbook_dir even if i do not specify - directory

I wish to copy files and folders from {{ playbook_dir }}/tmpfiles/{{ Latest_Build_Number }}/<file or folder> on localhost to a remote host destination but it also copies over all the contents under {{ playbook_dir }} directory.
The below playbook has host mentioned as remote host
Below is my ansible playbook which works fine when the src is a file or set of files.
- name: "Copying files from local ansible host tmpfiles to target Destination server `{{ inventory_hostname }}`when the destination path is specified"
synchronize:
src: "{{ playbook_dir }}/tmpfiles/{{ Latest_Build_Number }}/{{ item | basename }}"
dest: "/tmp/moht/"
mode: push
rsync_opts: ""
with_items:
- "{{ source_file.split() }}"
The problem occurs when there is a folder inside {{ playbook_dir }}/tmpfiles/{{ Latest_Build_Number }}/.
The problem is with any directory say shif i.e {{ playbook_dir }}/tmpfiles/{{ Latest_Build_Number }}/shif other files from playbook_dir directory also get copied over to destination folder /tmp/mohtas
Here is how ansible WRONGLY constructed the rsync command as seen in the debug.
TASK [Copying files from local ansible host tmpfiles to target Destination server `desthost`when the destination path is specified] ***
task path: /web/playbooks/filecopy/copyfiles.yml:215
changed: [desthost] => (item=/tmp/shif) => {"changed": true, "cmd": "/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/share/centrifydc/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --out-format=<<CHANGED>>%i %n%L /web/playbooks/filecopy/tmpfiles/93/shif destuser#desthost:/tmp/mohtas/", "item": "/tmp/shif", "msg": ".d..t...... ./\n<f+++++++++ adddesttohost.yml\n<f+++++++++ allmwhosts.hosts\n<f+++++++++ backupfiles.yml\n<f+++++++++ copyfiles.retry\n<f+++++++++ copyfiles.yml\n<f+++++++++ dircheck.yml\n<f+++++++++ dircheckinner.yml\ncd+++++++++ shif/\n<f+++++++++ shif/72.log\ncd+++++++++ shif/log/\n<f+++++++++ shif/log/1.log\n<f+++++++++ shif/log/2.log\ncd+++++++++ shif/log/12/\ncd+++++++++ shif/log/13/\n<f+++++++++ shif/log/13/2.log\ncd+++++++++ tmpfiles/\n<f+++++++++ tmpfiles/copyfilesvelocity.yml\n<f+++++++++ tmpfiles/reqvelocityinstall.yml\n<f+++++++++ tmpfiles/velocityserver.hosts\ncd+++++++++ tmpfiles/13/\ncd+++++++++ tmpfiles/14/\n<f+++++++++ tmpfiles/14/allmwhosts.hosts\ncd+++++++++ tmpfiles/16/\n<f+++++++++ tmpfiles/16/allmwhosts.hosts\ncd+++++++++ tmpfiles/19/\n<f+++++++++ tmpfiles/19/ssl.conf\ncd+++++++++ tmpfiles/22/\ncd+++++++++ tmpfiles/23/\ncd+++++++++ tmpfiles/24/\n<f+++++++++ tmpfiles/24/ssl.conf\ncd+++++++++ tmpfiles/25/\n<f+++++++++ tmpfiles/25/ssl.conf\ncd+++++++++ tmpfiles/26/\n<f+++++++++ tmpfiles/26/ssl.conf\ncd+++++++++ tmpfiles/27/\n<f+++++++++ tmpfiles/27/ssl.conf\ncd+++++++++ tmpfiles/28/\n<f+++++++++ tmpfiles/28/ssl.conf\ncd+++++++++ tmpfiles/29/\n<f+++++++++ tmpfiles/29/ssl.conf\ncd+++++++++ tmpfiles/30/\n<f+++++++++ tmpfiles/30/ssl.conf\ncd+++++++++ tmpfiles/31/\n<f+++++++++ tmpfiles/31/ssl.conf\ncd+++++++++ tmpfiles/32/\n<f+++++++++ tmpfiles/32/ssl.conf\ncd+++++++++ tmpfiles/35/\ncd+++++++++ tmpfiles/36/\ncd+++++++++ tmpfiles/37/\n<f+++++++++ tmpfiles/37/sixhundredperm.txt\ncd+++++++++ tmpfiles/38/\ncd+++++++++ tmpfiles/39/\ncd+++++++++ tmpfiles/40/\ncd+++++++++ tmpfiles/41/\ncd+++++++++ tmpfiles/42/\n<f+++++++++ tmpfiles/42/sixhundredperm.txt\ncd+++++++++ tmpfiles/43/\n<f+++++++++ tmpfiles/43/sixhundredperm.txt\ncd+++++++++ tmpfiles/44/\n<f+++++++++ tmpfiles/44/sixhundredperm.txt\ncd+++++++++ tmpfiles/45/\n<f+++++++++ tmpfiles/45/sixhundredperm.txt\ncd+++++++++ tmpfiles/46/\n<f+++++++++ tmpfiles/46/sixhundredperm.txt\ncd+++++++++ tmpfiles/47/\n<f+++++++++ tmpfiles/47/sixhundredperm.txt\ncd+++++++++ tmpfiles/48/\n<f+++++++++ tmpfiles/48/sixhundredperm.txt\ncd+++++++++ tmpfiles/49/\n<f+++++++++ tmpfiles/49/sixhundredperm.txt\ncd+++++++++ tmpfiles/50/\n<f+++++++++ tmpfiles/50/sixhundredperm.txt\ncd+++++++++ tmpfiles/51/\n<f+++++++++ tmpfiles/51/sixhundredperm.txt\ncd+++++++++ tmpfiles/52/\n<f+++++++++ tmpfiles/52/sixhundredperm.txt\ncd+++++++++ tmpfiles/53/\n<f+++++++++ tmpfiles/53/sixhundredperm.txt\ncd+++++++++ tmpfiles/54/\n<f+++++++++ tmpfiles/54/sixhundredperm.txt\ncd+++++++++ tmpfiles/55/\n<f+++++++++ tmpfiles/55/sixhundredperm.txt\ncd+++++++++ tmpfiles/56/\n<f+++++++++ tmpfiles/56/sixhundredperm.txt\ncd+++++++++ tmpfiles/58/\n<f+++++++++ tmpfiles/58/sixhundredperm.txt\ncd+++++++++ tmpfiles/61/\n<f+++++++++ tmpfiles/61/sixhundredperm.txt\ncd+++++++++ tmpfiles/62/\n<f+++++++++ tmpfiles/62/sixhundredperm.txt\ncd+++++++++ tmpfiles/63/\n<f+++++++++ tmpfiles/63/sixhundredperm.txt\ncd+++++++++ tmpfiles/64/\n<f+++++++++ tmpfiles/64/sixhundredperm.txt\ncd+++++++++ tmpfiles/66/\n<f+++++++++ tmpfiles/66/sixhundredperm.txt\n<f+++++++++ tmpfiles/66/test.txt\ncd+++++++++ tmpfiles/67/\n<f+++++++++ tmpfiles/67/sixhundredperm.txt\n<f+++++++++ tmpfiles/67/test.txt\ncd+++++++++ tmpfiles/68/\n<f+++++++++ tmpfiles/68/sixhundredperm.txt\n<f+++++++++ tmpfiles/68/test.txt\ncd+++++++++ tmpfiles/69/\n<f+++++++++ tmpfiles/69/sixhundredperm.txt\n<f+++++++++ tmpfiles/69/test.txt\ncd+++++++++ tmpfiles/70/\n<f+++++++++ tmpfiles/70/sixhundredperm.txt\n<f+++++++++ tmpfiles/70/test.txt\ncd+++++++++ tmpfiles/71/\n<f+++++++++ tmpfiles/71/sixhundredperm.txt\n<f+++++++++ tmpfiles/71/test.txt\ncd+++++++++ tmpfiles/73/\n<f+++++++++ tmpfiles/73/sixhundredperm.txt\n<f+++++++++ tmpfiles/73/test.txt\ncd+++++++++ tmpfiles/74/\n<f+++++++++ tmpfiles/74/sixhundredperm.txt\n<f+++++++++ tmpfiles/74/test.txt\ncd+++++++++ tmpfiles/75/\n<f+++++++++ tmpfiles/75/sixhundredperm.txt\n<f+++++++++ tmpfiles/75/test.txt\ncd+++++++++ tmpfiles/76/\n<f+++++++++ tmpfiles/76/sixhundredperm.txt\n<f+++++++++ tmpfiles/76/test.txt\ncd+++++++++ tmpfiles/77/\n<f+++++++++ tmpfiles/77/sixhundredperm.txt\n<f+++++++++ tmpfiles/77/test.txt\ncd+++++++++ tmpfiles/78/\n<f+++++++++ tmpfiles/78/sixhundredperm.txt\n<f+++++++++ tmpfiles/78/test.txt\ncd+++++++++ tmpfiles/79/\n<f+++++++++ tmpfiles/79/sixhundredperm.txt\n<f+++++++++ tmpfiles/79/test.txt\ncd+++++++++ tmpfiles/80/\n<f+++++++++ tmpfiles/80/sixhundredperm.txt\n<f+++++++++ tmpfiles/80/test.txt\ncd+++++++++ tmpfiles/81/\n<f+++++++++ tmpfiles/81/sixhundredperm.txt\n<f+++++++++ tmpfiles/81/test.txt\ncd+++++++++ tmpfiles/82/\n<f+++++++++ tmpfiles/82/sixhundredperm.txt\n<f+++++++++ tmpfiles/82/test.txt\ncd+++++++++ tmpfiles/83/\n<f+++++++++ tmpfiles/83/sixhundredperm.txt\n<f+++++++++ tmpfiles/83/test.txt\ncd+++++++++ tmpfiles/84/\ncd+++++++++ tmpfiles/84/shif/\n<f+++++++++ tmpfiles/84/shif/72.log\ncd+++++++++ tmpfiles/84/shif/log/\n<f+++++++++ tmpfiles/84/shif/log/1.log\n<f+++++++++ tmpfiles/84/shif/log/2.log\ncd+++++++++ tmpfiles/84/shif/log/12/\ncd+++++++++ tmpfiles/84/shif/log/13/\n<f+++++++++ tmpfiles/84/shif/log/13/2.log\ncd+++++++++ tmpfiles/85/\n<f+++++++++ tmpfiles/85/72.log\ncd+++++++++ tmpfiles/85/log/\n<f+++++++++ tmpfiles/85/log/1.log\n<f+++++++++ tmpfiles/85/log/2.log\ncd+++++++++ tmpfiles/85/log/12/\ncd+++++++++ tmpfiles/85/log/13/\n<f+++++++++ tmpfiles/85/log/13/2.log\ncd+++++++++ tmpfiles/86/\ncd+++++++++ tmpfiles/86/shif/\n<f+++++++++ tmpfiles/86/shif/72.log\ncd+++++++++ tmpfiles/86/shif/log/\n<f+++++++++ tmpfiles/86/shif/log/1.log\n<f+++++++++ tmpfiles/86/shif/log/2.log\ncd+++++++++ tmpfiles/86/shif/log/12/\ncd+++++++++ tmpfiles/86/shif/log/13/\n<f+++++++++ tmpfiles/86/shif/log/13/2.log\ncd+++++++++ tmpfiles/87/\n<f+++++++++ tmpfiles/87/sixhundredperm.txt\ncd+++++++++ tmpfiles/88/\n<f+++++++++ tmpfiles/88/sixhundredperm.txt\n<f+++++++++ tmpfiles/88/test.txt\ncd+++++++++ tmpfiles/89/\ncd+++++++++ tmpfiles/89/shif/\n<f+++++++++ tmpfiles/89/shif/72.log\ncd+++++++++ tmpfiles/89/shif/log/\n<f+++++++++ tmpfiles/89/shif/log/1.log\n<f+++++++++ tmpfiles/89/shif/log/2.log\ncd+++++++++ tmpfiles/89/shif/log/12/\ncd+++++++++ tmpfiles/89/shif/log/13/\n<f+++++++++ tmpfiles/89/shif/log/13/2.log\ncd+++++++++ tmpfiles/90/\ncd+++++++++ tmpfiles/90/shif/\n<f+++++++++ tmpfiles/90/shif/72.log\ncd+++++++++ tmpfiles/90/shif/log/\n<f+++++++++ tmpfiles/90/shif/log/1.log\n<f+++++++++ tmpfiles/90/shif/log/2.log\ncd+++++++++ tmpfiles/90/shif/log/12/\ncd+++++++++ tmpfiles/90/shif/log/13/\n<f+++++++++ tmpfiles/90/shif/log/13/2.log\ncd+++++++++ tmpfiles/91/\ncd+++++++++ tmpfiles/91/shif/\n<f+++++++++ tmpfiles/91/shif/72.log\ncd+++++++++ tmpfiles/91/shif/log/\n<f+++++++++ tmpfiles/91/shif/log/1.log\n<f+++++++++ tmpfiles/91/shif/log/2.log\ncd+++++++++ tmpfiles/91/shif/log/12/\ncd+++++++++ tmpfiles/91/shif/log/13/\n<f+++++++++ tmpfiles/91/shif/log/13/2.log\ncd+++++++++ tmpfiles/92/\ncd+++++++++ tmpfiles/92/shif/\n<f+++++++++ tmpfiles/92/shif/72.log\ncd+++++++++ tmpfiles/92/shif/log/\n<f+++++++++ tmpfiles/92/shif/log/1.log\n<f+++++++++ tmpfiles/92/shif/log/2.log\ncd+++++++++ tmpfiles/92/shif/log/12/\ncd+++++++++ tmpfiles/92/shif/log/13/\n<f+++++++++ tmpfiles/92/shif/log/13/2.log\ncd+++++++++ tmpfiles/93/\ncd+++++++++ tmpfiles/93/shif/\n<f+++++++++ tmpfiles/93/shif/72.log\ncd+++++++++ tmpfiles/93/shif/log/\n<f+++++++++ tmpfiles/93/shif/log/1.log\n<f+++++++++ tmpfiles/93/shif/log/2.log\ncd+++++++++ tmpfiles/93/shif/log/12/\ncd+++++++++ tmpfiles/93/shif/log/13/\n<f+++++++++ tmpfiles/93/shif/log/13/2.log\n", "rc": 0, "stdout_lines": [".d..t...... ./", "<f+++++++++ adddesttohost.yml", "<f+++++++++ allmwhosts.hosts", "<f+++++++++ backupfiles.yml", "<f+++++++++ copyfiles.retry", "<f+++++++++ copyfiles.yml", "<f+++++++++ dircheck.yml", "<f+++++++++ dircheckinner.yml", "cd+++++++++ shif/", "<f+++++++++ shif/72.log", "cd+++++++++ shif/log/", "<f+++++++++ shif/log/1.log", "<f+++++++++ shif/log/2.log", "cd+++++++++ shif/log/12/", "cd+++++++++ shif/log/13/", "<f+++++++++ shif/log/13/2.log", "cd+++++++++ tmpfiles/", "<f+++++++++ tmpfiles/copyfilesvelocity.yml", "<f+++++++++ tmpfiles/reqvelocityinstall.yml", "<f+++++++++ tmpfiles/velocityserver.hosts", "cd+++++++++ tmpfiles/13/", "cd+++++++++ tmpfiles/14/", "<f+++++++++ tmpfiles/14/allmwhosts.hosts", "cd+++++++++ tmpfiles/16/", "<f+++++++++ tmpfiles/16/allmwhosts.hosts", "cd+++++++++ tmpfiles/19/", "<f+++++++++ tmpfiles/19/ssl.conf", "cd+++++++++ tmpfiles/22/", "cd+++++++++ tmpfiles/23/", "cd+++++++++ tmpfiles/24/", "<f+++++++++ tmpfiles/24/ssl.conf", "cd+++++++++ tmpfiles/25/", "<f+++++++++ tmpfiles/25/ssl.conf", "cd+++++++++ tmpfiles/26/", "<f+++++++++ tmpfiles/26/ssl.conf", "cd+++++++++ tmpfiles/27/", "<f+++++++++ tmpfiles/27/ssl.conf", "cd+++++++++ tmpfiles/28/", "<f+++++++++ tmpfiles/28/ssl.conf", "cd+++++++++ tmpfiles/29/", "<f+++++++++ tmpfiles/29/ssl.conf", "cd+++++++++ tmpfiles/30/", "<f+++++++++ tmpfiles/30/ssl.conf", "cd+++++++++ tmpfiles/31/", "<f+++++++++ tmpfiles/31/ssl.conf", "cd+++++++++ tmpfiles/32/", "<f+++++++++ tmpfiles/32/ssl.conf", "cd+++++++++ tmpfiles/35/", "cd+++++++++ tmpfiles/36/", "cd+++++++++ tmpfiles/37/", "<f+++++++++ tmpfiles/37/sixhundredperm.txt", "cd+++++++++ tmpfiles/38/", "cd+++++++++ tmpfiles/39/", "cd+++++++++ tmpfiles/40/", "cd+++++++++ tmpfiles/41/", "cd+++++++++ tmpfiles/42/", "<f+++++++++ tmpfiles/42/sixhundredperm.txt", "cd+++++++++ tmpfiles/43/", "<f+++++++++ tmpfiles/43/sixhundredperm.txt", "cd+++++++++ tmpfiles/44/", "<f+++++++++ tmpfiles/44/sixhundredperm.txt", "cd+++++++++ tmpfiles/45/", "<f+++++++++ tmpfiles/45/sixhundredperm.txt", "cd+++++++++ tmpfiles/46/", "<f+++++++++ tmpfiles/46/sixhundredperm.txt", "cd+++++++++ tmpfiles/47/", "<f+++++++++ tmpfiles/47/sixhundredperm.txt", "cd+++++++++ tmpfiles/48/", "<f+++++++++ tmpfiles/48/sixhundredperm.txt", "cd+++++++++ tmpfiles/49/", "<f+++++++++ tmpfiles/49/sixhundredperm.txt", "cd+++++++++ tmpfiles/50/", "<f+++++++++ tmpfiles/50/sixhundredperm.txt", "cd+++++++++ tmpfiles/51/", "<f+++++++++ tmpfiles/51/sixhundredperm.txt", "cd+++++++++ tmpfiles/52/", "<f+++++++++ tmpfiles/52/sixhundredperm.txt", "cd+++++++++ tmpfiles/53/", "<f+++++++++ tmpfiles/53/sixhundredperm.txt", "cd+++++++++ tmpfiles/54/", "<f+++++++++ tmpfiles/54/sixhundredperm.txt", "cd+++++++++ tmpfiles/55/", "<f+++++++++ tmpfiles/55/sixhundredperm.txt", "cd+++++++++ tmpfiles/56/", "<f+++++++++ tmpfiles/56/sixhundredperm.txt", "cd+++++++++ tmpfiles/58/", "<f+++++++++ tmpfiles/58/sixhundredperm.txt", "cd+++++++++ tmpfiles/61/", "<f+++++++++ tmpfiles/61/sixhundredperm.txt", "cd+++++++++ tmpfiles/62/", "<f+++++++++ tmpfiles/62/sixhundredperm.txt", "cd+++++++++ tmpfiles/63/", "<f+++++++++ tmpfiles/63/sixhundredperm.txt", "cd+++++++++ tmpfiles/64/", "<f+++++++++ tmpfiles/64/sixhundredperm.txt", "cd+++++++++ tmpfiles/66/", "<f+++++++++ tmpfiles/66/sixhundredperm.txt", "<f+++++++++ tmpfiles/66/test.txt", "cd+++++++++ tmpfiles/67/", "<f+++++++++ tmpfiles/67/sixhundredperm.txt", "<f+++++++++ tmpfiles/67/test.txt", "cd+++++++++ tmpfiles/68/", "<f+++++++++ tmpfiles/68/sixhundredperm.txt", "<f+++++++++ tmpfiles/68/test.txt", "cd+++++++++ tmpfiles/69/", "<f+++++++++ tmpfiles/69/sixhundredperm.txt", "<f+++++++++ tmpfiles/69/test.txt", "cd+++++++++ tmpfiles/70/", "<f+++++++++ tmpfiles/70/sixhundredperm.txt", "<f+++++++++ tmpfiles/70/test.txt", "cd+++++++++ tmpfiles/71/", "<f+++++++++ tmpfiles/71/sixhundredperm.txt", "<f+++++++++ tmpfiles/71/test.txt", "cd+++++++++ tmpfiles/73/", "<f+++++++++ tmpfiles/73/sixhundredperm.txt", "<f+++++++++ tmpfiles/73/test.txt", "cd+++++++++ tmpfiles/74/", "<f+++++++++ tmpfiles/74/sixhundredperm.txt", "<f+++++++++ tmpfiles/74/test.txt", "cd+++++++++ tmpfiles/75/", "<f+++++++++ tmpfiles/75/sixhundredperm.txt", "<f+++++++++ tmpfiles/75/test.txt", "cd+++++++++ tmpfiles/76/", "<f+++++++++ tmpfiles/76/sixhundredperm.txt", "<f+++++++++ tmpfiles/76/test.txt", "cd+++++++++ tmpfiles/77/", "<f+++++++++ tmpfiles/77/sixhundredperm.txt", "<f+++++++++ tmpfiles/77/test.txt", "cd+++++++++ tmpfiles/78/", "<f+++++++++ tmpfiles/78/sixhundredperm.txt", "<f+++++++++ tmpfiles/78/test.txt", "cd+++++++++ tmpfiles/79/", "<f+++++++++ tmpfiles/79/sixhundredperm.txt", "<f+++++++++ tmpfiles/79/test.txt", "cd+++++++++ tmpfiles/80/", "<f+++++++++ tmpfiles/80/sixhundredperm.txt", "<f+++++++++ tmpfiles/80/test.txt", "cd+++++++++ tmpfiles/81/", "<f+++++++++ tmpfiles/81/sixhundredperm.txt", "<f+++++++++ tmpfiles/81/test.txt", "cd+++++++++ tmpfiles/82/", "<f+++++++++ tmpfiles/82/sixhundredperm.txt", "<f+++++++++ tmpfiles/82/test.txt", "cd+++++++++ tmpfiles/83/", "<f+++++++++ tmpfiles/83/sixhundredperm.txt", "<f+++++++++ tmpfiles/83/test.txt", "cd+++++++++ tmpfiles/84/", "cd+++++++++ tmpfiles/84/shif/", "<f+++++++++ tmpfiles/84/shif/72.log", "cd+++++++++ tmpfiles/84/shif/log/", "<f+++++++++ tmpfiles/84/shif/log/1.log", "<f+++++++++ tmpfiles/84/shif/log/2.log", "cd+++++++++ tmpfiles/84/shif/log/12/", "cd+++++++++ tmpfiles/84/shif/log/13/", "<f+++++++++ tmpfiles/84/shif/log/13/2.log", "cd+++++++++ tmpfiles/85/", "<f+++++++++ tmpfiles/85/72.log", "cd+++++++++ tmpfiles/85/log/", "<f+++++++++ tmpfiles/85/log/1.log", "<f+++++++++ tmpfiles/85/log/2.log", "cd+++++++++ tmpfiles/85/log/12/", "cd+++++++++ tmpfiles/85/log/13/", "<f+++++++++ tmpfiles/85/log/13/2.log", "cd+++++++++ tmpfiles/86/", "cd+++++++++ tmpfiles/86/shif/", "<f+++++++++ tmpfiles/86/shif/72.log", "cd+++++++++ tmpfiles/86/shif/log/", "<f+++++++++ tmpfiles/86/shif/log/1.log", "<f+++++++++ tmpfiles/86/shif/log/2.log", "cd+++++++++ tmpfiles/86/shif/log/12/", "cd+++++++++ tmpfiles/86/shif/log/13/", "<f+++++++++ tmpfiles/86/shif/log/13/2.log", "cd+++++++++ tmpfiles/87/", "<f+++++++++ tmpfiles/87/sixhundredperm.txt", "cd+++++++++ tmpfiles/88/", "<f+++++++++ tmpfiles/88/sixhundredperm.txt", "<f+++++++++ tmpfiles/88/test.txt", "cd+++++++++ tmpfiles/89/", "cd+++++++++ tmpfiles/89/shif/", "<f+++++++++ tmpfiles/89/shif/72.log", "cd+++++++++ tmpfiles/89/shif/log/", "<f+++++++++ tmpfiles/89/shif/log/1.log", "<f+++++++++ tmpfiles/89/shif/log/2.log", "cd+++++++++ tmpfiles/89/shif/log/12/", "cd+++++++++ tmpfiles/89/shif/log/13/", "<f+++++++++ tmpfiles/89/shif/log/13/2.log", "cd+++++++++ tmpfiles/90/", "cd+++++++++ tmpfiles/90/shif/", "<f+++++++++ tmpfiles/90/shif/72.log", "cd+++++++++ tmpfiles/90/shif/log/", "<f+++++++++ tmpfiles/90/shif/log/1.log", "<f+++++++++ tmpfiles/90/shif/log/2.log", "cd+++++++++ tmpfiles/90/shif/log/12/", "cd+++++++++ tmpfiles/90/shif/log/13/", "<f+++++++++ tmpfiles/90/shif/log/13/2.log", "cd+++++++++ tmpfiles/91/", "cd+++++++++ tmpfiles/91/shif/", "<f+++++++++ tmpfiles/91/shif/72.log", "cd+++++++++ tmpfiles/91/shif/log/", "<f+++++++++ tmpfiles/91/shif/log/1.log", "<f+++++++++ tmpfiles/91/shif/log/2.log", "cd+++++++++ tmpfiles/91/shif/log/12/", "cd+++++++++ tmpfiles/91/shif/log/13/", "<f+++++++++ tmpfiles/91/shif/log/13/2.log", "cd+++++++++ tmpfiles/92/", "cd+++++++++ tmpfiles/92/shif/", "<f+++++++++ tmpfiles/92/shif/72.log", "cd+++++++++ tmpfiles/92/shif/log/", "<f+++++++++ tmpfiles/92/shif/log/1.log", "<f+++++++++ tmpfiles/92/shif/log/2.log", "cd+++++++++ tmpfiles/92/shif/log/12/", "cd+++++++++ tmpfiles/92/shif/log/13/", "<f+++++++++ tmpfiles/92/shif/log/13/2.log", "cd+++++++++ tmpfiles/93/", "cd+++++++++ tmpfiles/93/shif/", "<f+++++++++ tmpfiles/93/shif/72.log", "cd+++++++++ tmpfiles/93/shif/log/", "<f+++++++++ tmpfiles/93/shif/log/1.log", "<f+++++++++ tmpfiles/93/shif/log/2.log", "cd+++++++++ tmpfiles/93/shif/log/12/", "cd+++++++++ tmpfiles/93/shif/log/13/", "<f+++++++++ tmpfiles/93/shif/log/13/2.log"]}
How can I make sure whether a file or folder is present under {{ playbook_dir }}/tmpfiles/{{ Latest_Build_Number }}/ only that file / folder or a combination of files and folders get copied over to the destination folder /tmp/mohtas ?

The issue of extra files getting copied was because of the rsync_opts: ""
I set default(omit) if rsync_opts was blank at runtime.
Learning: never keep rsync_opts: "" better omit.

Related

How can I create error bars similar to Vega Lite in eCharts

I am trying to create error bars similar to the one in Vega Lite
Vega Lite Error Bar.
I would like to plot Q25, Q50, Q75 versus gender (as the first category) and age as the second.
I tried to organize my data in different ways, so Q is the same as Q25, Q50, Q75. I am having trouble achieving my goal.
// Generate data.
data = [
[
'jobId',
'Region',
'rid',
'ContributionLimit',
'Q25',
'Q50',
'Q75',
'entryNR',
'Gender',
'AgeCategory',
'Q'
],
[
2446,
'Baden-W\u00fcrttemberg',
9,
6900.0,
2330.0,
2628.0,
3032.0,
883,
'Gesamt',
'25 bis unter 55',
[2330.0, 2628.0, 3032.0]
],
[
2446,
'Baden-W\u00fcrttemberg',
9,
6900.0,
2330.0,
2628.0,
3032.0,
883,
'Gesamt',
'Gesamt',
[2330.0, 2628.0, 3032.0]
],
[
2446,
'Baden-W\u00fcrttemberg',
9,
6900.0,
2302.0,
2561.0,
2852.0,
777,
'Frauen',
'Gesamt',
[2302.0, 2561.0, 2852.0]
],
[
2446,
'Baden-W\u00fcrttemberg',
9,
6900.0,
2286.0,
2542.0,
2827.0,
528,
'Frauen',
'25 bis unter 55',
[2286.0, 2542.0, 2827.0]
]
];
option = {
dataset: [
{
id: 'raw',
source: data
},
{
id: 'rid_f',
fromDatasetId: 'raw',
transform: [
{
type: 'filter',
config: {
dimension: 'rid',
eq: 9
}
}
]
},
{
id: 'Gesamt',
fromDatasetId: 'rid_f',
transform: [
{
type: 'filter',
config: {
dimension: 'AgeCategory',
eq: 'Gesamt'
}
}
]
},
{
id: '25 bis unter 55',
fromDatasetId: 'rid_f',
transform: [
{
type: 'filter',
config: {
dimension: 'AgeCategory',
eq: '25 bis unter 55'
}
}
]
},
],
legend: {
top: '10%'
},
yAxis: {
type: 'category',
},
xAxis: {
type: 'value'
},
series: [
{
name: 'ab 55',
type: 'line',
datasetId: 'Gesamt',
symbolSize: 6,
encode: {
x: ['Q25', 'Q50', 'Q75'],
y: 'Gender',
label: 'Gender',
itemName: 'Gender'
}
},
{
name: '25 bis unter 55',
type: 'line',
datasetId: '25 bis unter 55',
symbolSize: 6,
encode: {
x: 'Q',
y: 'Gender',
label: 'Gender',
itemName: 'Gender'
}
}
]
};

Broken Dashboards and panels in a report of Logi Analytics (Info)

I had a report that functioned well but crashed recently. The error messages were not helpful.
The main page displayed a dashboard with multiple panels that held data tables, but the dashboard was broken suddenly.
I discovered that when I deleted the dashboard and all panels, and I replaced them with an empty dashboard and an empty panel, the report was still broken and shown me the same error message which is showing below.
Has anyone dealt with the error before? Are there any solutions? Any that are simple and small?  
Source code and Error messages
source code image
Logi Debugger Trace Report
There was an error while processing your request.
The error was:
**There was a problem evaluating an expression. The error was: "Error: in expression ".**
Compute Data Operation Plan
View Data Operation PlanData Operation Group 1:
- Retrieve data
Data Operation Group 2:
- ReportCenterFilter ID="rdReportCenterFilter"
Data Operation Group 3:
- CompareFilter ID="cmpIsVisual"
- CompareFilter ID="cmpNotCurrentUser"
Data Operation Group 4:
- DeDuplicateFilter
Data Operation Group 5:
- AggregateColumn ID="RowCount"
Data Operation Group 6:
- DataLayerLink ID="dlSharedFrom"
Data Operation Group 1 of 6
View Group Details (1 Items)Details for Data Operation Group 1 of 6
Load data into engine
- Running as a separate Data Operation Group since the next step requires access to the full data file.
Generating this debugger information increases the overall elapsed time.
logi debugger img 1
logi debugger img 2
Detailed Error Report
There was an error while processing your request.
Message:
There was a problem evaluating an expression. The error was: "Error: in expression ".
Source:
rdServer
Stack Trace:
at rdServer.rdScriptEvaluator.Eval(String sExpression, String sErrorResult, Int32 iValueCountPassed)
at rdServer.PageBuilder.k(XmlElement A_0)
at rdServer.PageBuilder.ax(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.ax(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.q(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.s(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.r(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.q(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.s(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.r(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.q(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.s(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.r(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.ax(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.q(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.s(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.r(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ah(XmlElement& A_0, String A_1)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.ax(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.rdDashboard.a(XmlElement& A_0, XmlElement A_1)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.az(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.ak(XmlElement A_0)
at rdServer.PageBuilder.a6(XmlElement& A_0)
at rdServer.PageBuilder.bf(XmlElement& A_0)
at rdServer.PageBuilder.BuildHtml(String RequestedPage)
at rdServer.ResponseBuilder.BuildResponse()
Inner error:
Message:
Error: in expression
Source:
Microsoft.VisualBasic
Stack Trace:
Error: in expression
at Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at rdServer.rdScriptEvaluator.Eval(String sExpression, String sErrorResult, Int32 iValueCountPassed)
rdServer error image 1
rdServer error image 2
I have no errors when copying your code into a new report, so I suspect there might be an issue with your project directory (a support file, perhaps?). I would suggest starting a new project, and slowly copying over your reports one at a time, to confirm; alternatively, restore the directory from a backup, if possible, to see if that resolves the error.
<?xml version="1.0" encoding="UTF-8"?>
<Report ID="Dashboard">
<StyleSheet StyleSheet="newStyleSheet.css" />
<ReportHeader />
<Body>
<Dashboard2 ID="testDash" SaveFile="#Function.AppPhysicalPath~\SavedDashboards\a.Dashboard_Default_.xml">
<Panel Caption="panel header" ID="pnlTest1">
<PanelContent>
<Label Caption="test Label" />
</PanelContent>
</Panel>
</Dashboard2>
</Body>
<DefaultRequestParams Interval="0" />
<ReportFooter />
<ideTestParams />
</Report>

How can I print size of array for meta_data?

I want to print size of array for meta_data. Following is an object of items:
array(1){
[
8
]=>object(WC_Order_Item_Product)#3734(11){
[
"extra_data": protected
]=>array(9){
[
"product_id"
]=>int(0)[
"variation_id"
]=>int(0)[
"quantity"
]=>int(1)[
"tax_class"
]=>string(0)""[
"subtotal"
]=>int(0)[
"subtotal_tax"
]=>int(0)[
"total"
]=>int(0)[
"total_tax"
]=>int(0)[
"taxes"
]=>array(2){
[
"subtotal"
]=>array(0){
}[
"total"
]=>array(0){
}
}
}[
"data": protected
]=>array(11){
[
"order_id"
]=>int(17616)[
"name"
]=>string(10)"Alex check"[
"product_id"
]=>int(17477)[
"variation_id"
]=>int(0)[
"quantity"
]=>int(1)[
"tax_class"
]=>string(0)""[
"subtotal"
]=>float(960)[
"subtotal_tax"
]=>string(1)"0"[
"total"
]=>float(960)[
"total_tax"
]=>string(1)"0"[
"taxes"
]=>array(2){
[
"total"
]=>array(0){
}[
"subtotal"
]=>array(0){
}
}
}[
"cache_group": protected
]=>string(11)"order-items"[
"meta_type": protected
]=>string(10)"order_item"[
"object_type": protected
]=>string(10)"order_item"[
"id": protected
]=>int(8)[
"changes": protected
]=>array(0){
}[
"object_read": protected
]=>bool(true)[
"default_data": protected
]=>array(11){
[
"order_id"
]=>int(0)[
"name"
]=>string(0)""[
"product_id"
]=>int(0)[
"variation_id"
]=>int(0)[
"quantity"
]=>int(1)[
"tax_class"
]=>string(0)""[
"subtotal"
]=>int(0)[
"subtotal_tax"
]=>int(0)[
"total"
]=>int(0)[
"total_tax"
]=>int(0)[
"taxes"
]=>array(2){
[
"subtotal"
]=>array(0){
}[
"total"
]=>array(0){
}
}
}[
"data_store": protected
]=>object(WC_Data_Store)#3736(4){
[
"instance": "WC_Data_Store": private
]=>object(WC_Order_Item_Product_Data_Store)#3737(3){
[
"internal_meta_keys": protected
]=>array(20){
[
0
]=>string(9)"_order_id"[
1
]=>string(5)"_name"[
2
]=>string(11)"_product_id"[
3
]=>string(13)"_variation_id"[
4
]=>string(9)"_quantity"[
5
]=>string(10)"_tax_class"[
6
]=>string(9)"_subtotal"[
7
]=>string(13)"_subtotal_tax"[
8
]=>string(6)"_total"[
9
]=>string(10)"_total_tax"[
10
]=>string(6)"_taxes"[
11
]=>string(11)"_product_id"[
12
]=>string(13)"_variation_id"[
13
]=>string(4)"_qty"[
14
]=>string(10)"_tax_class"[
15
]=>string(14)"_line_subtotal"[
16
]=>string(18)"_line_subtotal_tax"[
17
]=>string(11)"_line_total"[
18
]=>string(9)"_line_tax"[
19
]=>string(14)"_line_tax_data"
}[
"meta_type": protected
]=>string(10)"order_item"[
"object_id_field_for_meta": protected
]=>string(13)"order_item_id"
}[
"stores": "WC_Data_Store": private
]=>array(18){
[
"coupon"
]=>string(24)"WC_Coupon_Data_Store_CPT"[
"customer"
]=>string(22)"WC_Customer_Data_Store"[
"customer-download"
]=>string(31)"WC_Customer_Download_Data_Store"[
"customer-session"
]=>string(30)"WC_Customer_Data_Store_Session"[
"order"
]=>string(23)"WC_Order_Data_Store_CPT"[
"order-refund"
]=>string(30)"WC_Order_Refund_Data_Store_CPT"[
"order-item"
]=>string(24)"WC_Order_Item_Data_Store"[
"order-item-coupon"
]=>string(31)"WC_Order_Item_Coupon_Data_Store"[
"order-item-fee"
]=>string(28)"WC_Order_Item_Fee_Data_Store"[
"order-item-product"
]=>string(32)"WC_Order_Item_Product_Data_Store"[
"order-item-shipping"
]=>string(33)"WC_Order_Item_Shipping_Data_Store"[
"order-item-tax"
]=>string(28)"WC_Order_Item_Tax_Data_Store"[
"payment-token"
]=>string(27)"WC_Payment_Token_Data_Store"[
"product"
]=>string(25)"WC_Product_Data_Store_CPT"[
"product-grouped"
]=>string(33)"WC_Product_Grouped_Data_Store_CPT"[
"product-variable"
]=>string(34)"WC_Product_Variable_Data_Store_CPT"[
"product-variation"
]=>string(35)"WC_Product_Variation_Data_Store_CPT"[
"shipping-zone"
]=>string(27)"WC_Shipping_Zone_Data_Store"
}[
"current_class_name": "WC_Data_Store": private
]=>string(32)"WC_Order_Item_Product_Data_Store"[
"object_type": "WC_Data_Store": private
]=>string(18)"order-item-product"
}[
"meta_data": protected
]=>array(3){
[
0
]=>object(WC_Meta_Data)#3751(2){
[
"current_data": protected
]=>array(3){
[
"id"
]=>int(93)[
"key"
]=>string(130)"pantalone ($890.00)"[
"value"
]=>string(1)"1"
}[
"data": protected
]=>array(3){
[
"id"
]=>int(93)[
"key"
]=>string(130)"pantalone ($890.00)"[
"value"
]=>string(1)"1"
}
}[
1
]=>object(WC_Meta_Data)#3752(2){
[
"current_data": protected
]=>array(3){
[
"id"
]=>int(94)[
"key"
]=>string(125)"Shoes ($40.00)"[
"value"
]=>string(1)"1"
}[
"data": protected
]=>array(3){
[
"id"
]=>int(94)[
"key"
]=>string(125)"Shoes ($40.00)"[
"value"
]=>string(1)"1"
}
}[
2
]=>object(WC_Meta_Data)#3753(2){
[
"current_data": protected
]=>array(3){
[
"id"
]=>int(95)[
"key"
]=>string(123)"Cap ($30.00)"[
"value"
]=>string(1)"1"
}[
"data": protected
]=>array(3){
[
"id"
]=>int(95)[
"key"
]=>string(123)"Cap ($30.00)"[
"value"
]=>string(1)"1"
}
}
}
}
}
Please anyone can help me to figure out. I tried to figure out with the following function:
function custom_cnt_items($items) {
$order = wc_get_order( 17616 );
$items = $order->get_items();
$arr = [];
foreach($items as $k => $obj) {
$arr[] = $obj;
}
foreach($arr[0] as $k => $v) {
foreach($v as $a => $b) {
echo $a . $b;
}
}
wp_die();
}
But is not working in Wordpress functions.php file…
I could not access meta_data object property directly by using object because it is protected. I have to use some woocommerce methods inside that particular class to retreive data that in array format.

JSON Path - get count of array

Here's my sample JSON -
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
},
"expensive": 10
}
I'm unable to get the count of the array for the below expression
$.store.book[?(#.category == "fiction")].length()
How to get it? I'm using goessner 0.8.0.

JQ: Transform UNIX Timestamp to Datetime

I use actually JQ1.5 under a Windows 10 environment to transform several json files for an import to a MS SQL database. Part of the data are formatted in UNIX timestamp and I need to transform those data to ISO 8601 Format.
Following command i use actually for the transformation of the data:
jq '
[
{ nid, title, nights, zone: .zones[0].title} +
(.sails[] | { sails_nid: .nid, arrival, departure } ) +
(.sails[].cabins[] |
{ cabintype: .cabinType.kindName,
cabinid: .cabinType.nid,
catalogPrice,
discountPrice,
discountPercentage,
currency
}
)
]
' C:\Import\dreamlines_details.json > C:\Import\import_sails.json
Arrival and departure are the data that are in Unix time formated.
Data:
[
{
"nid": 434508,
"title": "Die schönsten Orte unserer Welt",
"nights": 121,
"zone": "Weltreise",
"sails_nid": 434516,
"arrival": 1525644000,
"departure": 1515193200,
"cabintype": "Innenkabine",
"cabinid": 379723,
"catalogPrice": 17879,
"discountPrice": 9519,
"discountPercentage": 0.4675876726886291,
"currency": "EUR"
},
{
"nid": 434508,
"title": "Die schönsten Orte unserer Welt",
"nights": 121,
"zone": "Weltreise",
"sails_nid": 434516,
"arrival": 1525644000,
"departure": 1515193200,
"cabintype": "Innenkabine",
"cabinid": 379730,
"catalogPrice": 18599,
"discountPrice": 10239,
"discountPercentage": 0.44948653153395346,
"currency": "EUR"
}
]
I experimented with built in operator "todate" and "strftime". But get only parsing Errors.
Use todateiso8601 function:
jq '.[].arrival |= todateiso8601 | .[].departure |= todateiso8601' C:\Import\import_sails.json
The output (for your input fragment):
[
{
"nid": 434508,
"title": "Die schönsten Orte unserer Welt",
"nights": 121,
"zone": "Weltreise",
"sails_nid": 434516,
"arrival": "2018-05-06T22:00:00Z",
"departure": "2018-01-05T23:00:00Z",
"cabintype": "Innenkabine",
"cabinid": 379723,
"catalogPrice": 17879,
"discountPrice": 9519,
"discountPercentage": 0.4675876726886291,
"currency": "EUR"
},
{
"nid": 434508,
"title": "Die schönsten Orte unserer Welt",
"nights": 121,
"zone": "Weltreise",
"sails_nid": 434516,
"arrival": "2018-05-06T22:00:00Z",
"departure": "2018-01-05T23:00:00Z",
"cabintype": "Innenkabine",
"cabinid": 379730,
"catalogPrice": 18599,
"discountPrice": 10239,
"discountPercentage": 0.44948653153395346,
"currency": "EUR"
}
]
I had a similar problem when parsing output of Perforce (with -Mj option),
but the epoch times were strings, not numbers.
$ p4 -z tag -Mj labels -e "test_build" | jq '.'
{
"Access": "1581356898",
"Description": "Created by p4build.\n",
"Options": "unlocked noautoreload",
"Owner": "p4build",
"Update": "1580936739",
"label": "test_build"
}
Adding tonumber into the filter fixes it:
$ p4 -z tag -Mj labels -e "test_build" > test.json
$ jq -s '.[].Access |= (tonumber | todateiso8601) | .[].Update |= (tonumber | todateiso8601)' test.json
[
{
"Access": "2020-02-10T17:48:18Z",
"Description": "Created by p4build.\n",
"Options": "unlocked noautoreload",
"Owner": "p4build",
"Update": "2020-02-05T21:05:39Z",
"label": "test_build"
}
]

Resources