Skip to content

Commit

Permalink
Add changelog fragment
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Sep 21, 2023
1 parent 4767ee4 commit 47f1bc7
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 21 deletions.
31 changes: 31 additions & 0 deletions changelogs/fragments/ansible_lint_6_19.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
breaking_changes:
- roles/awsconfig_multiregion_cloudtrail - ``operation`` option has been renamed to ``awsconfig_multiregion_cloudtrail_operation`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/awsconfig_multiregion_cloudtrail - ``bucket_name`` option has been renamed to ``awsconfig_multiregion_cloudtrail_bucket_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/awsconfig_multiregion_cloudtrail - ``key_prefix`` option has been renamed to ``awsconfig_multiregion_cloudtrail_key_prefix`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/awsconfig_multiregion_cloudtrail - ``trail_name`` option has been renamed to ``awsconfig_multiregion_cloudtrail_trail_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``plan_name`` option has been renamed to ``backup_create_plan_plan_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``plan_rules`` option has been renamed to ``backup_create_plan_plan_rules`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``plan_windows_vss_settings`` option has been renamed to ``backup_create_plan_plan_windows_vss_settings`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``plan_tags`` option has been renamed to ``backup_create_plan_plan_tags`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``vault_name`` option has been renamed to ``backup_create_plan_vault_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``vault_encryption_key_arn`` option has been renamed to ``backup_create_plan_vault_encryption_key_arn`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_create_plan - ``vault_tags`` option has been renamed to ``backup_create_planvault_tags`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_select_resources - ``plan_name`` option has been renamed to ``backup_select_resources_plan_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_select_resources - ``selection_name`` option has been renamed to ``backup_select_resources_selection_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_select_resources - ``selection_tags`` option has been renamed to ``backup_select_resources_selection_tags`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_select_resources - ``selection_conditions`` option has been renamed to ``backup_select_resources_selection_conditions`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/backup_select_resources - ``backup_role_name`` option has been renamed to ``backup_select_resources_backup_role_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``custom_ami_operation`` option has been renamed to ``customized_ami_operation`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``custom_ami_name`` option has been renamed to ``customized_ami_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``custom_ami_packages`` option has been renamed to ``customized_ami_packages`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``custom_ami_recreate_if_exists`` option has been renamed to ``customized_ami_recreate_if_exists`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``source_ami_filters`` option has been renamed to ``customized_ami_source_ami_filters`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``source_ami_image_id`` option has been renamed to ``customized_ami_source_ami_image_id`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/customized_ami - ``source_ami_user_name`` option has been renamed to ``customized_ami_source_ami_user_name`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/ec2_instance_terminate_by_tag - ``tag_key_to_terminate_instances`` option has been renamed to `` ec2_instance_terminate_by_tag_tag_key_to_terminate_instances`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/ec2_instance_terminate_by_tag - ``tag_value_to_terminate_instances`` option has been renamed to `` ec2_instance_terminate_by_tag_tag_value_to_terminate_instances`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/ec2_instance_terminate_by_tag - ``terminate_protected_instances`` option has been renamed to `` ec2_instance_terminate_by_tag_terminate_protected_instances`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/manage_transit_gateway - ``action`` option has been renamed to `` manage_transit_gateway_action`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/manage_transit_gateway - ``transit_gateway`` option has been renamed to `` manage_transit_gateway_transit_gateway`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/manage_transit_gateway - ``vpc_attachment`` option has been renamed to `` manage_transit_gateway_vpc_attachment`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
- roles/manage_transit_gateway - ``vpn_attachment`` option has been renamed to `` manage_transit_gateway_vpn_attachment`` (https://github.com/redhat-cop/cloud.aws_ops/pull/84).
8 changes: 4 additions & 4 deletions playbooks/aws_restore_cloudtrail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
ansible.builtin.include_role:
name: cloud.aws_ops.awsconfig_multiregion_cloudtrail
vars:
operation: create
bucket_name: "{{ s3_bucket_name }}"
key_prefix: "{{ s3_key_prefix | default(omit) }}"
trail_name: "{{ cloudtrail_name }}"
awsconfig_multiregion_cloudtrail_operation: create
awsconfig_multiregion_cloudtrail_bucket_name: "{{ s3_bucket_name }}"
awsconfig_multiregion_cloudtrail_key_prefix: "{{ s3_key_prefix | default(omit) }}"
awsconfig_multiregion_cloudtrail_trail_name: "{{ cloudtrail_name }}"

- name: Include 'cloud.aws_ops.enable_cloudtrail_encryption_with_kms' role
ansible.builtin.include_role:
Expand Down
8 changes: 4 additions & 4 deletions roles/backup_select_resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ Example Playbooks
backup_select_resources_selection_name: s3_buckets
backup_select_resources_selection_resources:
- "{{ all_s3_buckets }}"
backup_role_name: my-iam-role
backup_select_resources_backup_role_name: my-iam-role

### Create backup plan and select resources

- hosts: localhost
roles:
- role: cloud.aws_ops.backup_create_plan
vars:
plan_name: my-backup-plan
plan_rules:
backup_select_resources_plan_name: my-backup-plan
backup_select_resources_plan_rules:
- "{{ daily_backup }}"

- hosts: localhost
Expand All @@ -74,7 +74,7 @@ Example Playbooks
backup_select_resources_selection_name: s3_buckets
backup_select_resources_selection_resources:
- "{{ all_s3_buckets }}"
backup_role_name: my-iam-role
backup_select_resources_backup_role_name: my-iam-role

License
-------
Expand Down
14 changes: 7 additions & 7 deletions roles/customized_ami/tasks/create_ec2_resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- dest: 0.0.0.0/0
gateway_id: "{{ customized_ami__internet_gateway.gateway_id }}"
lookup: tag
tags: "{{ custom_ami_resource_tags }}"
tags: "{{ customized_ami_resource_tags }}"
state: present

- name: Create security group allowing SSH connection
Expand All @@ -45,15 +45,15 @@
rules_egress:
- cidr_ip: 0.0.0.0/0
proto: -1
tags: "{{ customized_amiresource_tags }}"
tags: "{{ customized_ami_resource_tags }}"
state: present
register: customized_ami__security_group

- name: Create key pair to connect to the VM
amazon.aws.ec2_key:
name: "{{ customized_ami_key_name }}"
key_material: "{{ lookup('file', customized_amipublic_key_file) }}"
tags: "{{ customized_amiresource_tags }}"
key_material: "{{ lookup('file', customized_ami_public_key_file) }}"
tags: "{{ customized_ami_resource_tags }}"

- name: Create a virtual machine
amazon.aws.ec2_instance:
Expand All @@ -69,7 +69,7 @@
security_groups:
- "{{ customized_ami__security_group.group_id }}"
wait: true
tags: "{{ custom_ami_resource_tags }}"
tags: "{{ customized_ami_resource_tags }}"
state: started
register: customized_ami__ec2

Expand All @@ -80,9 +80,9 @@
- name: Add host to inventory
ansible.builtin.add_host:
hostname: ec2
ansible_ssh_user: "{{ source_ami_user_name }}"
ansible_ssh_user: "{{ customized_ami_source_ami_user_name }}"
ansible_host: "{{ customized_ami__ec2.instances.0.public_ip_address }}"
ansible_ssh_common_args: -o "UserKnownHostsFile=/dev/null" -o StrictHostKeyChecking=no -i {{ custom_ami_private_key_file }}
ansible_ssh_common_args: -o "UserKnownHostsFile=/dev/null" -o StrictHostKeyChecking=no -i {{ customized_ami_private_key_file }}
ansible_python_interpreter: auto

- name: Gather facts from ec2 instance
Expand Down
2 changes: 1 addition & 1 deletion roles/customized_ami/tasks/read_source_ami.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
block:
- name: Get source AMI image ID using filters
amazon.aws.ec2_ami_info:
filters: "{{ source_ami_filters }}"
filters: "{{ customized_ami_source_ami_filters }}"
register: customized_ami__source_images
# very spammy
no_log: true
Expand Down
6 changes: 3 additions & 3 deletions roles/manage_transit_gateway/tasks/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
- name: Create transit gateway
community.aws.ec2_transit_gateway:
state: present
description: "{{ transit_gateway.description }}"
asn: "{{ transit_gateway.asn }}"
tags: "{{ transit_gateway.tags }}"
description: "{{ manage_transit_gateway_transit_gateway.description }}"
asn: "{{ manage_transit_gateway_transit_gateway.asn }}"
tags: "{{ manage_transit_gateway_transit_gateway.tags }}"
register: manage_transit_gateway_tgw_result

- name: Verify that transit gateway has been created/updated
Expand Down
2 changes: 1 addition & 1 deletion roles/manage_transit_gateway/tasks/delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.set_fact:
manage_transit_gateway_gw: "{{ item }}"
when:
- item.description == transit_gateway.description
- item.description == manage_transit_gateway_transit_gateway.description
- item.state == "available"
loop: "{{ manage_transit_gateway_info.transit_gateways }}"

Expand Down
2 changes: 1 addition & 1 deletion roles/manage_transit_gateway/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

block:
- name: Include file
ansible.builtin.include_tasks: "{{ action }}.yaml"
ansible.builtin.include_tasks: "{{ manage_transit_gateway_action }}.yaml"
4 changes: 4 additions & 0 deletions tests/integration/targets/test_customized_ami/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
- name: Test role 'customized_ami'
collections:
- amazon.aws
- community.crypto
vars:
customized_ami_ec2_instance_type: t2.micro
customized_ami_public_key_file: "{{ setup_rsa_keys__public_key_file }}"
Expand All @@ -12,6 +15,7 @@
vars:
customized_ami_packages:
- podman
customized_ami_name: "{{ custom_ami_name }}"

- name: Validate settings for initial AMI
vars:
Expand Down

0 comments on commit 47f1bc7

Please sign in to comment.