Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

[Feature] Add support of payer option, to allow usage with ansible s3_bucket library #227

Open
bbaja42 opened this issue Nov 16, 2017 · 0 comments

Comments

@bbaja42
Copy link

bbaja42 commented Nov 16, 2017

Hi, I tried using fakes3 with ansible s3_bucket plugin, with very simple setup.

  1. Start fakes3
  2. try ansible with following config
- hosts: localhost
  tasks:

  - s3_bucket:
      name: test
      s3_url: fakes3://localhost:8080

This fails with

s_status = get_request_payment_status(bucket)\n  File \"/var/folders/23/qtv6c__j5fsfsfhnl957cm8c8fzbcs/T/ansible_1Rdemc/ansible_module_s3_bucket.py\", line 153, in get_request_payment_status\n    return (payer != \"BucketOwner\")\nUnboundLocalError: local variable 'payer' referenced before assignment\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0}

The issue is that ansible expects payer in XML returned from S3, and since it is not there; fails

https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/s3_bucket.py#L143

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant