aws_s3 module problem Ansible 2.4

116 views
Skip to first unread message

Arbab Nazar

unread,
Sep 19, 2017, 1:19:29 PM9/19/17
to Ansible Project
I have simple task to download file from s3 bucket which works fine with Ansible 2.3, when I have upgraded the ansible from 2.3 to 2.4, it complain that I need to use the aws_s3 module instead of s3 which I did and getting the following error:

─➤ansible-playbook -i localhost, playbook.yml                                                                    4


PLAY
[all] *******************************************************************************************************************


TASK
[Download the latest version of from S3 bucket] *************************************************************************
fatal
: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Key /node/qa/1.0.483/node.tar.gz with version id None does not exist."}


PLAY RECAP
*******************************************************************************************************************
localhost                  
: ok=0    changed=0    unreachable=0    failed=1



Here is my task:


   
- name: Download the latest version of from S3 bucket
      aws_s3
:
        aws_access_key
: "xxxxxxxxxxx"
        aws_secret_key
: "yyyyyyyyyyyyyyyyyyyyyyy"
        bucket
: "artifacts-bucket"
       
object: "/node/qa/1.0.483/node.tar.gz"
        mode
: get
        dest
: "node.tar.gz"

Few notes:
- versioning is not enabled on my s3 bucket
- installed the boto3 that is the requirement for aws_s3 module
- the exact same tasks work fine with ansible 2.3 and did give this error
"Key /node/qa/1.0.483/node.tar.gz with version id None does not exist."

Any help appreciated

Will Thames

unread,
Sep 20, 2017, 12:18:58 AM9/20/17
to Ansible Project
Looks like this was a bug introduced with the move from boto to boto3.

A fix is in progress:


Will Thames

unread,
Sep 20, 2017, 12:28:16 AM9/20/17
to Ansible Project
Note that until this is fixed, removing the leading '/' from your object will work.
Reply all
Reply to author
Forward
0 new messages