Repository: ansible/ansible

Issue:
Documentation: Module s3 - unclear description of overwrite / force
From @mkrogemann on 2014-12-04T22:20:59Z
##### Issue Type: “Documentation Report”
##### Component Name: s3 module
##### Ansible Version: ansible 1.8.1
##### Environment: Mac OS X 10.9.5
##### Summary: I believe there is an error in the documentation of the overwrite / force parameters in the S3 module documentation. The parameter name is documented to be 'overwrite'. However, the examples do not mention this parameter but use 'force' instead which is not documented. Maybe these two parameters have been confused?
##### Steps To Reproduce: n/a
##### Expected Results: n/a
##### Actual Results: n/a

Copied from original issue: ansible/ansible-modules-core#449

Documentation: Module s3 - unclear description of overwrite / force
From @mkrogemann on 2014-12-04T22:20:59Z
##### Issue Type: “Documentation Report”
##### Component Name: s3 module
##### Ansible Version: ansible 1.8.1
##### Environment: Mac OS X 10.9.5
##### Summary: I believe there is an error in the documentation of the overwrite / force parameters in the S3 module documentation. The parameter name is documented to be 'overwrite'. However, the examples do not mention this parameter but use 'force' instead which is not documented. Maybe these two parameters have been confused?
##### Steps To Reproduce: n/a
##### Expected Results: n/a
##### Actual Results: n/a

Copied from original issue: ansible/ansible-modules-core#449



Discussion:
From @mpdehaan on 2014-12-04T22:20:59Z

force is an alias.  I agree we should only use the default which is 'force'.

From @babadofar on 2014-12-04T22:20:59Z

Current documentation says overwrite has a default value of True, but the examples show that it can be used with the value "different". Could this be the mysterious three-valued boolean we all been looking for so long?  

This is from the example

```
# GET an object but dont download if the file checksums match
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get overwrite=different
```

cc @lwade
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
cc @s-hertel
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
From @mpdehaan on 2014-12-04T22:20:59Z

force is an alias.  I agree we should only use the default which is 'force'.

From @babadofar on 2014-12-04T22:20:59Z

Current documentation says overwrite has a default value of True, but the examples show that it can be used with the value "different". Could this be the mysterious three-valued boolean we all been looking for so long?  

This is from the example

```
# GET an object but dont download if the file checksums match
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get overwrite=different
```

cc @lwade
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
cc @s-hertel
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/cloud/amazon/aws_s3.py b/lib/ansible/modules/cloud/amazon/aws_s3.py
--- a/lib/ansible/modules/cloud/amazon/aws_s3.py
+++ b/lib/ansible/modules/cloud/amazon/aws_s3.py
@@ -103,6 +103,7 @@
       - Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations.
         Boolean or one of [always, never, different], true is equal to 'always' and false is equal to 'never', new in 2.0
     default: 'always'
+    aliases: ['force']
     version_added: "1.2"
   region:
     description:


Test patch: