I'm trying to migrate my config files from a folder on an ec2 instance to an s3 bucket. We use ansible to update changes to these config files every deploy and I'm having issues getting ansible to work with s3. Here's the old ansible section for updating the config files to ec2.
- name: Install config files
copy: src="{{core_repo}}/config/{{item.path}}" dest=/opt/company/config owner=user group=user mode=0644 directory_mode=0755
with_items: config_files
tags:
- deploy
nothing crazy, just copy a bunch of files with certain permissions. Ansible's copy has no problem finding the files described in config_files.
Here's my new ansible section for updating the config files to s3.
- name: Install config files
s3: bucket=company-config object="/{{item.path}}" src="{{core_repo}}/config/{{item.path}}" mode=put aws_access_key=access aws_secret_key=secret
with_items: config_files
tags:
- deploy
As you can see, I haven't changed the way in which I reference the files themselves. However, I'm now receiving an error for each of these files:
failed: [ip] => (item={'path': 'application.properties'}) => {"failed": true, "item": {"path": "application.properties"}}
msg: Local object for PUT does not exist
Any idea what I might be doing wrong? Or any suggestions as to how I might fix this issue? I'm using ansible-playbook 1.9.4.