Commit Graph

31 Commits (41f57373345d8424845752401f8da7b52c378683)

Author SHA1 Message Date
Ryan Brown 0c37949941 Remove spurious `changed` state on iam_policy module (#4381)
Due to a mixup of the group/role/user and policy names, policies with
the same name as the group/role/user they are attached to would never be
updated after creation. To fix that, we needed two changes to the logic
of policy comparison:

- Compare the new policy name to *all* matching policies, not just the
  first in lexicographical order
- Compare the new policy name to the matching ones, not to the IAM
  object the policy is attached to
8 years ago
Michael Baydoun 07383c40d7
fixes issues where iam_policy incorrected reported changed 8 years ago
codemeup @ Work 7314cc3867 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.
8 years ago
Kalle Lehtonen 5aa652c6fd Fix and add more error handling for role policies
In case role policy was deleted, we did not handle at all if there

was authorization issue to do the deletion. Also add message when

role is not found and the policy is skipped.
9 years ago
Toshio Kuratomi 1c4da434c7 Merge pull request #2421 from willthames/ec2_fix_vpc_security_token
Use connect_to_aws where possible
9 years ago
Toshio Kuratomi e9454fa44f Merge pull request #2352 from bermudezjd/feature/iam_policy_present_state_includes_policy_changes
Feature/iam policy present state includes policy changes
9 years ago
Bermudez, Jaime 2ad0be9425 Merge branch 'devel' into feature/iam_policy_present_state_includes_policy_changes
Conflicts:
	cloud/amazon/iam_policy.py
9 years ago
Yoichi Imai 00376af7d6 Fix iam_policy pdoc variable 9 years ago
Brian Coca 1fe6479617 be smarter when dealing with policy_json input
Now module will assume that if the argument is a string it is already formated as json
and will only try to convert non strings into json string.
Also removed unused 'msg' var declarations and the ifs that set them
fixes #2009
9 years ago
Jay Rogers cab97cd2d9 Update in Amazon IAM Policy Documentation
There were typos in the documentation that made the examples seem misleading of what was being demonstrated. This update fixes that.
9 years ago
Mike Riddle 062c7764e6 Fixed error message: TypeError: fail_json() takes exactly 1 argument (2 given) 9 years ago
Will Thames 0dd58e9326 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`
9 years ago
Brian Coca c91da5714e Merge pull request #2279 from wimnat/feature/iam_policy_idempotentcy
Allow iam_policy to maintain idempotence if the role referenced has …
9 years ago
Bermudez, Jaime 6992d0d465 Merge remote-tracking branch 'upstream/devel' into feature/iam_policy_present_state_includes_policy_changes 9 years ago
Bermudez, Jaime d5f48d29e1 Simplify logic around "present" state and skip dupes. If the policy doesn't exist or the policy document doesn't match or if we're not skipping dupes, then we go ahead and update the respective user/group/role policy. 9 years ago
Etherdaemon 08559670e5 Update try statement as pointed out by defionscode 9 years ago
Etherdaemon 2b2285eb67 fixes #12831 by updating the boto iam connection method to connect_to_region 9 years ago
whiter 6fc58855b9 Allow iam_policy to maintain idempotentce if the role referenced has been removed 9 years ago
Brian Coca 7af7ef2ef7 Merge pull request #2086 from wimnat/feature/issue-2085
Remove 'str' type so that json is properly quoted
9 years ago
Brian Coca c4f64d822c changed modules to use common ec2 docs for region 9 years ago
Rob 9bf0d06e4a Update iam_policy.py
Fixed doc for policy_name - it is a required field
Removed empty aliases
9 years ago
whiter 719f68e057 Remove 'str' type so that json is properly quoted 9 years ago
wimnat 8e9c85bed2 Remove unnecessary json.loads 9 years ago
Baraa Basata dc9dfa9ef8 Fix iam_policy example 9 years ago
Brian Coca 52543435d6 Merge pull request #1562 from micxer/iam_policy-json-string
Add the option to pass a string as policy
9 years ago
Michael Weinrich 4da3a724f1 Fix connection creation to allow usage of profiles with boto 9 years ago
Toshio Kuratomi 7edacf6b1c Use module.fail_json() instead of sys.exit() 9 years ago
Michael Weinrich 559ad374f5 Add the option to pass a string as policy 9 years ago
Greg DeKoenigsberg 28a869a030 Updating cloud modules with proper github author information 9 years ago
Jonathan Davila e2773f7554 author fix 9 years ago
Jonathan Davila 19e7e99470 iam_policy 10 years ago