Skip to content

Commit

Permalink
Update remaining _info modules so that they run in check_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Jul 28, 2021
1 parent c966e27 commit c153c8d
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 7 deletions.
8 changes: 8 additions & 0 deletions changelogs/fragments/659-checkmode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
minor_changes:
- aws_sgw_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- ec2_asg_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- ec2_lc_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- iam_mfa_device_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- iam_server_certificate_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- wafv2_resources_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
- wafv2_web_acl_info - ensure module runs in check_mode (https://github.com/ansible-collections/community.aws/issues/659)
6 changes: 5 additions & 1 deletion plugins/modules/aws_sgw_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,11 @@ def main():
gather_volumes=dict(type='bool', default=True)
)

module = AnsibleAWSModule(argument_spec=argument_spec)
module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
)

if module._name == 'aws_sgw_facts':
module.deprecate("The 'aws_sgw_facts' module has been renamed to 'aws_sgw_info'", date='2021-12-01', collection_name='community.aws')
client = module.client('storagegateway')
Expand Down
7 changes: 6 additions & 1 deletion plugins/modules/ec2_asg_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,12 @@ def main():
name=dict(type='str'),
tags=dict(type='dict'),
)
module = AnsibleAWSModule(argument_spec=argument_spec)

module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
)

if module._name == 'ec2_asg_facts':
module.deprecate("The 'ec2_asg_facts' module has been renamed to 'ec2_asg_info'", date='2021-12-01', collection_name='community.aws')

Expand Down
6 changes: 5 additions & 1 deletion plugins/modules/ec2_lc_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ def main():
sort_end=dict(required=False, type='int'),
)

module = AnsibleAWSModule(argument_spec=argument_spec)
module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
)

if module._name == 'ec2_lc_facts':
module.deprecate("The 'ec2_lc_facts' module has been renamed to 'ec2_lc_info'", date='2021-12-01', collection_name='community.aws')

Expand Down
5 changes: 4 additions & 1 deletion plugins/modules/iam_mfa_device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def main():
user_name=dict(required=False, default=None),
)

module = AnsibleAWSModule(argument_spec=argument_spec)
module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
)
if module._name == 'iam_mfa_device_facts':
module.deprecate("The 'iam_mfa_device_facts' module has been renamed to 'iam_mfa_device_info'", date='2021-12-01', collection_name='community.aws')

Expand Down
6 changes: 5 additions & 1 deletion plugins/modules/iam_server_certificate_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ def main():
name=dict(type='str'),
)

module = AnsibleAWSModule(argument_spec=argument_spec,)
module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
)

if module._name == 'iam_server_certificate_facts':
module.deprecate("The 'iam_server_certificate_facts' module has been renamed to 'iam_server_certificate_info'",
date='2021-12-01', collection_name='community.aws')
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/wafv2_resources_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def main():
)

module = AnsibleAWSModule(
argument_spec=arg_spec
argument_spec=arg_spec,
supports_check_mode=True,
)

name = module.params.get("name")
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/wafv2_web_acl_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def main():
)

module = AnsibleAWSModule(
argument_spec=arg_spec
argument_spec=arg_spec,
supports_check_mode=True,
)

state = module.params.get("state")
Expand Down

0 comments on commit c153c8d

Please sign in to comment.