Commit Graph

47 Commits (c52964a6f4595b9e60e059d792a43d6853182cdf)

Author SHA1 Message Date
John Barker 10cd2cd1b7 Manually fix issues that autopep8 introduced
* iam.py 161 -> 160 chars
* lamba -> single line function -> multiline function

Avoid redefining key

iam line length

iam.py now clean
2017-12-07 20:25:55 +00:00
John Barker c57a7f05e1 Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues

Generated using:
autopep8 1.3.3 (pycodestyle: 2.3.1)
autopep8 -r  --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules

Manually fix issues that autopep8 has introduced
2017-12-07 20:25:55 +00:00
patlachance 45e35be4c1 iam.py: return iam.role dict when creating roles (#28964) 2017-11-03 09:55:27 -04:00
Toshio Kuratomi 9c81257ce3 Remove wildcard imports from amazon modules (#31451)
* Remove wildcard imports from amazon modules
* Remove files from legacy pep8 that now pass
2017-10-09 07:38:41 -07:00
David M. Lee 1d4ca0fd51 amazon: extract copies of boto_exception to module_utils.ec2 (#20403)
* amazon: extract boto_exception to ec2 module

This function was copy/pasted throughout several Amazon modules. This
causes a consistency problem, since some improvements to message
formatting were applied to some modules but not others. Now all modules
use the same, improved function.

* Rebase and make requested changes

* Rebase and make requested changes
2017-08-23 11:40:32 -04:00
Sloane Hertel cbb94a75fe Enable deleting IAM users with associated MFA devices. (#27288)
Refactore delete_user() since most of the heavy lifting was being done in the exception handling, which is not at all necessary and resulted in changed=False being shown after changes were successfully made.
2017-08-22 15:59:02 -04:00
Toshio Kuratomi f203ca7907 Update metadata to 1.1 2017-08-15 23:12:08 -07:00
mdawid92 bfdf85e002 [cloud] IAM module returns created keys (#21237)
* return new key, porting https://github.com/ansible/ansible-modules-core/pull/3385/ by defionscode

* fix python3 compatibility

* fixed indentation

* added user_meta field
2017-07-26 16:24:29 -04:00
Denis Afonso c9b00d2f02 Fixed the exception handling logic for the delete_group function. (#26109)
* Fixed he exception handling logic for the delete_group function.

fixes issue #26100

* Removed the unnecessary del_meta variables and made some other adjustments to the delete_user function
2017-06-30 14:12:50 -04:00
MaciejCetler 0d179c77a7 fix for iam (#23347)
* fix for iam

* Update iam.py

removed extra space
2017-06-28 11:11:19 -04:00
Sloane Hertel a4552c11b3 allow groups parameter to be noticed as an empty list (#22707)
make iam.py pep8

remove iam.py from pep8 legacy files
2017-03-17 16:11:48 -04:00
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Matt Clay 5f89fc4a68 PEP 8 E111 cleanup. 2017-01-30 20:08:33 -08:00
Matt Clay 10d9318de7 PEP 8 indent cleanup. (#20800)
* PEP 8 E121 cleanup.

* PEP 8 E126 cleanup.

* PEP 8 E122 cleanup.
2017-01-29 07:28:53 +00:00
Matt Clay 95789f3949 PEP 8 whitespace cleanup. (#20783)
* PEP 8 E271 whitespace cleanup.
* PEP 8 W293 whitespace cleanup.
* Fix whitespace issue from recent PR.
2017-01-27 15:45:23 -08:00
Matt Clay c709b22e5c Fix differences with devel. 2016-12-08 11:35:21 -05:00
James Cammarata 8afa090417 Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Fabio Alessandro Locati c8fd24ee04 Call main in conditional way - cloud/amazon 2016-12-08 11:25:35 -05:00
Andrew Gaffney 2ef59561ba Fix bare variable references in docs (#5554) 2016-12-08 11:25:27 -05:00
John R Barker 25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Ryan S. Brown a2e6ac6ca8 IAM group modules need `module` passed
The IAM group modules were not receiving the `module` object, but they
use `module.fail_json()` in their exception handlers. This patch passes
through the module object so the real errors from boto are exposed,
rather than errors about "NoneType has no method `fail_json`".
2016-12-08 11:24:39 -05:00
Matt Davis 81e7720f62 Iam trust policy (#3885)
* added support for trust policies

* added version_added to new params in DOC string

* update version_added on new iam args to 2.2
2016-12-08 11:24:36 -05:00
Jonathan A. Sternberg 97917121a6 Paginate the results from `boto.iam`
The default pagination is every 100 items with a maximum of 1000 from
Amazon. This properly uses the marker returned by Amazon to concatenate
the various pages from the results.

This fixes #2440.
2016-12-08 11:24:34 -05:00
@ 3fa745eef9 Fixing error exception handling for python3. Does not need to be compa… (#3840)
* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing error exception handling for python. Does not need to be compatible with Python2.4 b/c boto is Python 2.6 and above.

* Fixing compile time errors IRT error exception handling for Python 3.5.
This does not need to be compatible with Python2.4 b/c Boto is Python 2.6 and above.
2016-12-08 11:24:34 -05:00
Kenny Woodson cd09aab9b4 Unindenting the delete to user (#3147) 2016-12-08 11:24:30 -05:00
Kaz Cheng ff1c591c3e Allow create_iam_role to return an additional value of role_result and (#2418)
instance_profile_result, in addition to the existing role list and change value
2016-12-08 11:24:29 -05:00
Dennis Conrad 70b0891f95 Fix UnboundLocalError if 'access_key_ids' not supplied
'key_ids' is referenced before it is assigned, causing the module to fail with a UnboundLocalError instead of failing gracefully with a helpful error message.  This very small patch moves the assignment of 'key_ids' to before the variable is referenced.
2016-12-08 11:24:19 -05:00
whiter dadf835a06 Remove access_key and secret_key as these are provided by aws doc fragment Remove ec2 doc fragment as region is not required for IAM 2016-12-08 11:24:14 -05:00
Jonathan Davila f24c3fb40e Clarified IAM module doc 2016-12-08 11:24:12 -05:00
Will Thames 52accd7d1f Use connect_to_aws where possible
`connect_to_aws` fixes a bug with security tokens in AWS.
Modules should use that rather than calling
`boto.x.connect_to_region`
2016-12-08 11:24:09 -05:00
Ben Visser 18ff22348a fixed grammatical issue in iam.py. exit -> exist. 2016-12-08 11:24:00 -05:00
Rabenstein 8eb04fe0d3 Squash of 3 commits for bugfix.
Absent unction was not working on user with login profile
also fixed the exception handling

fixed the delete user function
now works with or without loginprofile (password)

typo
2016-12-08 11:23:47 -05:00
Rabenstein 4c08545974 Absent unction was not working on user with login profile also fixed the exception handling 2016-12-08 11:23:47 -05:00
Etherdaemon 63c8c40a37 Update try statement as pointed out by defionscode 2016-12-08 11:23:42 -05:00
Etherdaemon 9fe689eaec fixes #12831 by updating the boto iam connection method to connect_to_region 2016-12-08 11:23:42 -05:00
Toshio Kuratomi 29cfd80220 Fix improper indentation 2016-12-08 11:23:36 -05:00
Rob 4f9bb86e58 Add exception handling to iam 2016-12-08 11:23:35 -05:00
billwanjohi 167e940e78 iam: don't delete passwords by default 2016-12-08 11:23:25 -05:00
Jonathan Davila f1027ae6bc no_log to iam password 2016-12-08 11:23:16 -05:00
Michael Weinrich 1f6c177da0 Use aws connect calls that allow boto profile use 2016-12-08 11:23:12 -05:00
billwanjohi 86e679fe3c iam: use modern helper to allow sts
previous implementation ignored the session token when present
2016-12-08 11:23:11 -05:00
toninog bea77c938e fixes to code to enable updates of user to groups and delete groups. Fixed example yaml to use groups 2016-12-08 11:23:10 -05:00
toninog ab7678f199 Fixed more issues with the delete_group and paramater mismatch 2016-12-08 11:23:10 -05:00
Greg DeKoenigsberg 18ca7aee07 Updating cloud modules with proper github author information 2016-12-08 11:23:07 -05:00
toninog 15b65fa115 Fixed bug in example where updating a user to a group Fixed bug in create_group and update_group whereby paramaters were not being set correctly. 2016-12-08 11:23:05 -05:00
Jonathan Davila a329dc05c0 iam module with fixes
iam module. fix policy issue.

bugfix

allow for modifying path without declaring new_path
2016-12-08 11:23:04 -05:00