Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename iam_cert to iam_server_certificate for consistency #728

Merged
merged 1 commit into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/728-iam_cert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deprecated_features:
- iam_cert - the iam_cert module has been renamed to iam_server_certificate for consistency with the companion iam_server_certificate_info module.
The usage of the module has not changed. The iam_cert alias will be removed in version 4.0.0 (https://github.com/ansible-collections/community.aws/pull/728).
11 changes: 10 additions & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ action_groups:
- elb_target_group_facts
- iam_mfa_device_facts
- iam_role_facts
- iam_cert_facts
- iam_server_certificate_facts
- lambda_facts
- rds_instance_facts
Expand Down Expand Up @@ -171,6 +172,7 @@ action_groups:
- iam_role
- iam_role_info
- iam_saml_federation
- iam_server_certificate
- iam_server_certificate_info
- iam_user
- iam_user_info
Expand Down Expand Up @@ -448,7 +450,7 @@ plugin_routing:
deprecation:
removal_date: 2021-12-01
warning_text: >-
iam_cert_facts was renamed in Ansible 2.9 to iam_cert_info.
iam_cert_facts was renamed in Ansible 2.9 to iam_server_certificate_info.
Please update your tasks.
iam_mfa_device_facts:
deprecation:
Expand All @@ -462,6 +464,13 @@ plugin_routing:
warning_text: >-
iam_role_facts was renamed in Ansible 2.9 to iam_role_info.
Please update your tasks.
iam_cert:
redirect: community.aws.iam_server_certificate
deprecation:
removal_version: 4.0.0
warning_text: >-
iam_cert has been renamed to iam_server_certificate for consistency.
Please update your tasks.
iam_server_certificate_facts:
deprecation:
removal_date: 2021-12-01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

DOCUMENTATION = '''
---
module: iam_cert
module: iam_server_certificate
version_added: 1.0.0
short_description: Manage server certificates for use on ELBs and CloudFront
description:
Expand Down Expand Up @@ -85,23 +85,23 @@

EXAMPLES = '''
- name: Basic server certificate upload from local file
community.aws.iam_cert:
community.aws.iam_server_certificate:
name: very_ssl
state: present
cert: "{{ lookup('file', 'path/to/cert') }}"
key: "{{ lookup('file', 'path/to/key') }}"
cert_chain: "{{ lookup('file', 'path/to/certchain') }}"

- name: Basic server certificate upload
community.aws.iam_cert:
community.aws.iam_server_certificate:
name: very_ssl
state: present
cert: path/to/cert
key: path/to/key
cert_chain: path/to/certchain

- name: Server certificate upload using key string
community.aws.iam_cert:
community.aws.iam_server_certificate:
name: very_ssl
state: present
path: "/a/cert/path/"
Expand All @@ -110,7 +110,7 @@
cert_chain: body_of_myverytrustedchain

- name: Basic rename of existing certificate
community.aws.iam_cert:
community.aws.iam_server_certificate:
name: very_ssl
new_name: new_very_ssl
state: present
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/targets/iam_server_certificate/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cloud/aws

iam_server_certificate_info
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- setup_remote_tmp_dir
34 changes: 34 additions & 0 deletions tests/integration/targets/iam_server_certificate/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# iam_server_certificate integration tests
#
# Current module limitations:
#
- module_defaults:
group/aws:
aws_access_key: '{{ aws_access_key }}'
aws_secret_key: '{{ aws_secret_key }}'
security_token: '{{ security_token | default(omit) }}'
region: '{{ aws_region }}'
block:
# Check that the alias works
- iam_cert: {}
ignore_errors: true
register: iam_cert_alias

- 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')

always:
- debug: msg=test

################################################
# TEARDOWN STARTS HERE
################################################