From fec135a1c91462f18c3a9bfb325e0797f82e2cc0 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Wed, 24 Jul 2024 14:07:12 -0400 Subject: [PATCH 1/8] Update Readme to match the template --- README.md | 51 +++++++++++++------ .../fragments/readme_template_update.yml | 3 ++ 2 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 changelogs/fragments/readme_template_update.yml diff --git a/README.md b/README.md index 68d1d5ac..f93ba3e3 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,23 @@ -# cloud.aws_ops roles/playbooks/rulebooks to demo Ansible on AWS +# cloud.aws_ops Validated Content Collection This repository hosts the `cloud.aws_ops` Ansible Collection. -The collection includes a variety of Ansible roles, playbooks, and rulebooks to help automate the management of resources on AWS. +## Description + +This collection is curated to provide users with a robust set of roles, playbooks, and rulebooks that simplify and streamline various AWS operations. + +## Requirements + +The [amazon.aws](https://github.com/ansible-collections/amazon.aws) and [community.aws](https://github.com/ansible-collections/amazon.aws) collections MUST be installed in order for this collection to work. + +To run rulebooks, [ansible-rulebook](https://ansible.readthedocs.io/projects/rulebook/en/latest/) must be installed. -## Ansible version compatibility +### Ansible version compatibility This collection has been tested against following Ansible versions: **>=2.15.0**. -## Included content +### Included content Click on the name of a role, playbook, or rulebook to view that content's documentation: @@ -48,15 +56,7 @@ Name | Description [cloud.aws_ops.aws_manage_cloudtrail_encryption](extensions/eda/AWS_MANAGE_CLOUDTRAIL_ENCRYPTION.md)|An Event-Driven Ansible rulebook to ensure that an existing encrypted AWS Cloudtrail trail will not be deleted or have its encryption removed. -## Installation and Usage - -### Requirements - -The [amazon.aws](https://github.com/ansible-collections/amazon.aws) and [community.aws](https://github.com/ansible-collections/amazon.aws) collections MUST be installed in order for this collection to work. - -To run rulebooks, [ansible-rulebook](https://ansible.readthedocs.io/projects/rulebook/en/latest/) must be installed. - -### Installation +## Installation To consume this Validated Content from Automation Hub, please ensure that you add the following lines to your ansible.cfg file. @@ -77,7 +77,7 @@ Once the above steps are done, you can run the following command to install the ansible-galaxy collection install cloud.aws_ops ``` -### Using this collection +## Use Cases Once installed, you can reference the cloud.aws_ops collection content by its fully qualified collection name (FQCN), for example: @@ -101,7 +101,7 @@ Once installed, you can reference the cloud.aws_ops collection content by its fu We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository. -### Testing and Development +## Testing and Development The project uses `ansible-lint` and `black`. Assuming this repository is checked out in the proper structure, @@ -130,6 +130,27 @@ If you want to run cloud integration tests, ensure you log in to the cloud: This collection is tested using GitHub Actions. To know more about CI, refer to [CI.md](https://github.com/https://github.com/redhat-cop/cloud.aws_ops/blob/main/CI.md). +## Contributing to this collection + +We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository. + +## Support + +You can also join us on: + +- Libera.Chat IRC - the ``#ansible-aws`` [irc.libera.chat](https://libera.chat/) channel + +## Release Notes + +See the [raw generated changelog](https://github.com/redhat-cop/cloud.aws_ops/blob/main/CHANGELOG.rst). + + +## Related Information + + - [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html). + - [Ansible Rulebook documentation](https://ansible.readthedocs.io/projects/rulebook/en/stable/index.html). + - [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html) + ## License GNU General Public License v3.0 or later diff --git a/changelogs/fragments/readme_template_update.yml b/changelogs/fragments/readme_template_update.yml new file mode 100644 index 00000000..421756ad --- /dev/null +++ b/changelogs/fragments/readme_template_update.yml @@ -0,0 +1,3 @@ +--- +trivial: + - Update the README doc to match https://access.redhat.com/articles/7068606. From 3ac843d2838fff14ea67430e87c6a84e19292531 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Wed, 24 Jul 2024 14:13:44 -0400 Subject: [PATCH 2/8] Bump the ansible version --- meta/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/runtime.yml b/meta/runtime.yml index 898ad8ff..1e85b01d 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,2 +1,2 @@ --- -requires_ansible: '>=2.15.0' +requires_ansible: ">=2.15.0" From d6cc8e349ff872ea75aa4dd178893e4a0bdffea2 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Wed, 24 Jul 2024 14:25:36 -0400 Subject: [PATCH 3/8] Removed redundant content --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index f93ba3e3..a7fe9673 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,6 @@ Once installed, you can reference the cloud.aws_ops collection content by its fu enable_cloudtrail_encryption_with_kms_kms_key_id: "{{ kms_alias }}" ``` -### See Also - -* [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details. -* [Ansible Rulebook documentation](https://ansible.readthedocs.io/projects/rulebook/en/stable/index.html) for information on using rulebooks. - ## Contributing to this collection We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository. From 68ad5fe8289027c377d04ee0c8bc1ccdf2deb6f6 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Wed, 24 Jul 2024 14:46:46 -0400 Subject: [PATCH 4/8] Add breaking_change changelog --- changelogs/fragments/ansible_support_update.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/ansible_support_update.yml diff --git a/changelogs/fragments/ansible_support_update.yml b/changelogs/fragments/ansible_support_update.yml new file mode 100644 index 00000000..2ae68725 --- /dev/null +++ b/changelogs/fragments/ansible_support_update.yml @@ -0,0 +1,3 @@ +--- +breaking_changes: + - cloud.aws_ops collection - Support for ansible-core < 2.15 has been dropped. From 43ed4a1d887ccd565be39a231f331532c7776851 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jul 2024 13:27:02 -0400 Subject: [PATCH 5/8] Address Review comments --- README.md | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a7fe9673..4a7e28cd 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ ansible-galaxy collection install cloud.aws_ops Once installed, you can reference the cloud.aws_ops collection content by its fully qualified collection name (FQCN), for example: ```yaml + # The following example restores encryption to an existing AWS Cloudtrail trail using the enable_cloudtrail_encryption_with_kms role - hosts: all tasks: - name: Include 'enable_cloudtrail_encryption_with_kms' role @@ -90,13 +91,35 @@ Once installed, you can reference the cloud.aws_ops collection content by its fu vars: enable_cloudtrail_encryption_with_kms_trail_name: "{{ cloudtrail_name }}" enable_cloudtrail_encryption_with_kms_kms_key_id: "{{ kms_alias }}" -``` -## Contributing to this collection + # The following example uses the ``cloud.aws_ops.clone_on_prem_vm`` role to clone an existing VM on prem using the KVM hypervisor and the ``cloud.aws_ops.import_image_and_run_aws_instance`` role to import a local .raw image into an Amazon machine image (AMI) and run an AWS EC2 instance. -We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository. + - hosts: all + tasks: + - name: Import 'cloud.aws_ops.clone_on_prem_vm' role + ansible.builtin.import_role: + name: cloud.aws_ops.clone_on_prem_vm + vars: + clone_on_prem_vm_source_vm_name: "{{ source_vm_name }}" + clone_on_prem_vm_image_name: "{{ image_name }}" + clone_on_prem_vm_uri: "{{ uri }}" + clone_on_prem_vm_local_image_path: "{{ local_image_path }}" + clone_on_prem_vm_overwrite: "{{ overwrite }}" + delegate_to: kvm + + - name: Import 'cloud.aws_ops.import_image_and_run_aws_instance' role + ansible.builtin.import_role: + name: cloud.aws_ops.import_image_and_run_aws_instance + vars: + import_image_and_run_aws_instance_bucket_name: "{{ bucket_name }}" + import_image_and_run_aws_instance_image_path: "{{ raw_image_path }}" + import_image_and_run_aws_instance_instance_name: "{{ instance_name }}" + import_image_and_run_aws_instance_instance_type: "{{ instance_type }}" + import_image_and_run_aws_instance_import_image_task_name: "{{ import_image_task_name }}" + import_image_and_run_aws_instance_keypair_name: "{{ keypair_name }}" +``` -## Testing and Development +## Testing The project uses `ansible-lint` and `black`. Assuming this repository is checked out in the proper structure, @@ -128,12 +151,15 @@ This collection is tested using GitHub Actions. To know more about CI, refer to ## Contributing to this collection We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository. +See [CONTRIBUTING.md](https://github.com/redhat-cop/cloud.aws_ops/blob/main/CONTRIBUTING.md) for more details. ## Support -You can also join us on: +For the latest supported versions, refer to the release notes below. -- Libera.Chat IRC - the ``#ansible-aws`` [irc.libera.chat](https://libera.chat/) channel +If you encounter issues or have questions, you can submit a support request through the following channels: + - GitHub Issues: Report bugs, request features, or ask questions by opening an issue in the [GitHub repository](https://github.com/redhat-cop/cloud.aws_ops/). + - Ansible Community: Engage with the Ansible community on the Ansible Project Mailing List or [Ansible Forum](https://forum.ansible.com/g/AWS).You can also join us on: ## Release Notes From 7337536eab9d11d210b56f7f0538ad55021281f5 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 25 Jul 2024 14:30:59 -0400 Subject: [PATCH 6/8] Update README.md Co-authored-by: Helen Bailey --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a7e28cd..d8e8609d 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ For the latest supported versions, refer to the release notes below. If you encounter issues or have questions, you can submit a support request through the following channels: - GitHub Issues: Report bugs, request features, or ask questions by opening an issue in the [GitHub repository](https://github.com/redhat-cop/cloud.aws_ops/). - - Ansible Community: Engage with the Ansible community on the Ansible Project Mailing List or [Ansible Forum](https://forum.ansible.com/g/AWS).You can also join us on: + - Ansible Community: Engage with the Ansible community on the Ansible Project Mailing List or [Ansible Forum](https://forum.ansible.com/g/AWS). ## Release Notes From 9e86b74348e1a112d62df260774e1bafeddcb6ef Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Fri, 26 Jul 2024 15:23:20 -0400 Subject: [PATCH 7/8] removed redundant changelog --- changelogs/fragments/ansible_support_update.yml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 changelogs/fragments/ansible_support_update.yml diff --git a/changelogs/fragments/ansible_support_update.yml b/changelogs/fragments/ansible_support_update.yml deleted file mode 100644 index 2ae68725..00000000 --- a/changelogs/fragments/ansible_support_update.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -breaking_changes: - - cloud.aws_ops collection - Support for ansible-core < 2.15 has been dropped. From 065beeb73e99dcabccb4d64db00936c0c978f501 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Fri, 26 Jul 2024 15:24:28 -0400 Subject: [PATCH 8/8] fix rebase spillover --- meta/runtime.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/runtime.yml b/meta/runtime.yml index 1e85b01d..898ad8ff 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,2 +1,2 @@ --- -requires_ansible: ">=2.15.0" +requires_ansible: '>=2.15.0'