From d76e9008eed7ddede54a48ee403f45c1a986bf68 Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Thu, 28 Jun 2018 16:03:40 -0400 Subject: [PATCH] [aws] Default state of iam_managed_policy to `present` (#42069) This default matches with the other IAM modules, such as iam_role. --- lib/ansible/modules/cloud/amazon/iam_managed_policy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/iam_managed_policy.py b/lib/ansible/modules/cloud/amazon/iam_managed_policy.py index 595b50693a8..71df98c2ebf 100644 --- a/lib/ansible/modules/cloud/amazon/iam_managed_policy.py +++ b/lib/ansible/modules/cloud/amazon/iam_managed_policy.py @@ -41,7 +41,7 @@ options: state: description: - Should this managed policy be present or absent. Set to absent to detach all entities from this policy and remove it if found. - required: True + default: present choices: [ "present", "absent" ] author: "Dan Kozlowski (@dkhenry)" extends_documentation_fragment: @@ -278,7 +278,7 @@ def main(): make_default=dict(type='bool', default=True), only_version=dict(type='bool', default=False), fail_on_delete=dict(type='bool', default=True), - state=dict(required=True, choices=['present', 'absent']), + state=dict(default='present', choices=['present', 'absent']), )) module = AnsibleModule(