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/93968a22-bee3-4960-a104-857fadbc73e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.