Skip to content

Commit

Permalink
Complete iam_cert and rds_snapshot deprecations (ansible-collections#…
Browse files Browse the repository at this point in the history
…1276)

Complete iam_cert and rds_snapshot deprecations

SUMMARY
Delayed from 4.0.0 to 5.0.0 remove the deprecated aliases
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
iam_server_certificate
rds_instance_snapshot
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@d38a4b1
  • Loading branch information
tremble authored and alinabuzachis committed Oct 13, 2023
1 parent 6d822e0 commit 983ddec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
12 changes: 6 additions & 6 deletions plugins/modules/iam_server_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
---
module: iam_server_certificate
version_added: 1.0.0
short_description: Manage server certificates for use on ELBs and CloudFront
short_description: Manage IAM server certificates for use on ELBs and CloudFront
description:
- Allows for the management of server certificates.
- Allows for the management of IAM server certificates.
options:
name:
description:
Expand Down Expand Up @@ -73,10 +73,11 @@
default: true
type: bool
author: Jonathan I. Davila (@defionscode)
author:
- Jonathan I. Davila (@defionscode)
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = '''
Expand All @@ -103,7 +104,6 @@
new_name: new_very_ssl
state: present
'''
import os

try:
import botocore
Expand Down
18 changes: 5 additions & 13 deletions tests/integration/targets/iam_server_certificate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,14 @@
block:
################################################

# Check that the alias works
- name: Test deprecated alias
iam_cert: {}
ignore_errors: true
register: iam_cert_alias

- name: Test with no args
iam_server_certificate: {}
ignore_errors: true
register: no_args

- assert:
that:
- iam_cert_alias is failed
- no_args is failed
- no_args.msg == iam_cert_alias.msg
- no_args.msg.startswith('missing required arguments')

################################################
Expand Down Expand Up @@ -195,7 +187,7 @@
################################################

- name: Delete certificate - check_mode
iam_cert:
iam_server_certificate:
name: '{{ cert_name }}'
state: absent
register: delete_cert
Expand All @@ -208,7 +200,7 @@
- delete_cert is changed

- name: Delete certificate
iam_cert:
iam_server_certificate:
name: '{{ cert_name }}'
state: absent
register: delete_cert
Expand All @@ -220,7 +212,7 @@
- delete_cert is changed

- name: Delete certificate - idempotency - check_mode
iam_cert:
iam_server_certificate:
name: '{{ cert_name }}'
state: absent
register: delete_cert
Expand All @@ -233,7 +225,7 @@
- delete_cert is not changed

- name: Delete certificate - idempotency
iam_cert:
iam_server_certificate:
name: '{{ cert_name }}'
state: absent
register: delete_cert
Expand Down Expand Up @@ -604,7 +596,7 @@
################################################

- name: Delete certificate
iam_cert:
iam_server_certificate:
name: '{{ item }}'
state: absent
ignore_errors: true
Expand Down

0 comments on commit 983ddec

Please sign in to comment.