So, after posting this question, I found a bug report on the same issue:  
https://github.com/ansible/ansible/issues/54076

Posting this answer for others.

On Sunday, April 28, 2019 at 10:33:58 PM UTC-4, Kane Consulting Group wrote:
>
> So, I am trying to synchronize files to Amazon S3 using the s3_sync 
> module.  The playbook works properly, with the exception of the 
> file_change_strategy parameter date_size.  It seems to ignore files with 
> same size, but different (more recent) dates.  Here is my playbook:
>
> ---
> - name: backup 
>   hosts: all
>   gather_facts: no
>   become: yes
>
> - name: sync all files to Amazon S3
>       vars:
>         ansible_python_interpreter: /usr/bin/python3
>       s3_sync:
>         aws_access_key: "{{ key }}"
>         aws_secret_key: "{{ secret }}"
>         region: us-east-1
>         bucket: "{{ s3bucket }}"
>         file_root: "/path/{{ mylocation }}/folder"
>         key_prefix: "{{ keyprefix }}/"
>         file_change_strategy: date_size
>         permission: bucket-owner-full-control
>         exclude: "*.txt" # sync all files except for txt
>
> I have verified the file(s) using touch/stat to make sure modified dates 
> are newer than the file stored on Amazon S3.
>
> The file(s) are created by a backup process.  Since the source file has 
> not changed, the resulting size of the backup file(s) is the same.  The 
> timestamp(s) are updated after each backup.
>
> I have also removed the exclude parameter to see if that had any impact on 
> the results.  There was no change.
>
> When I alter the file_change_strategy to "force", the newer file uploads 
> to Amazon S3.
>
> Bug? or am I missing something???
>

-- 
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/8885d740-47bf-4eae-82c9-52e06376517e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to