Hi,  

I was trying to do something using synchronize where I exclude some files 
and include others, but it does not work like rsync: 

So,  this works with rsync,   
- name: testrsync
  local_action: command rsync -aH --include '[e\|p]*' --exclude '*' 
prmfiles/output/{{ item.key }}/ {{ ansible_user_id }}@{{ inventory_hostname 
}}:/export/home/oracle/hhenjum/heathtest/
  when: oggaction == "prmfiles"
  with_dict: dirprm  | default({})

But,  when I try to do this with synchronize,  I can't get it to work.   It 
just passes through saying the step is "ok"... or no changes to do. 

- name: testsync
  synchronize: src=prmfiles/output/{{ item.key }}/ 
 dest=/export/home/oracle/hhenjum/heathtest/ checksum=yes 
rsync_opts="rsync_opts=--include='e*', --exclude='*'"
  when: oggaction == "prmfiles"
  with_dict: dirprm  | default({})


If I don't have the double quotes around rsync_opts, then it gives me, 
 msg: unsupported parameter for module: --exclude


I imagine this is something with the wildcards?    Also,  I understand it 
probably wasn't the intention for rsync_opts to handle everything you can 
do with rsync. 

It's not a huge issue.  I just changed the deploy so that we can just sync 
the whole directory rather than specific files, but I thought I'd check in 
case it should work. 

Thanks, 
Heath



-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7ee4f1ed-c09c-4132-b808-97994a202960%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to