{"id":20155258,"url":"https://github.com/redhat-cop/cloud.aws_ops","last_synced_at":"2025-04-09T22:02:39.576Z","repository":{"id":62234095,"uuid":"502174421","full_name":"redhat-cop/cloud.aws_ops","owner":"redhat-cop","description":"Ansible Roles for managing AWS Resources","archived":false,"fork":false,"pushed_at":"2025-01-29T11:20:11.000Z","size":875,"stargazers_count":10,"open_issues_count":2,"forks_count":22,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-09T22:02:31.195Z","etag":null,"topics":["validated-content"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-cop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-10T20:35:48.000Z","updated_at":"2025-01-29T11:20:16.000Z","dependencies_parsed_at":"2023-01-22T13:30:41.968Z","dependency_job_id":"118632be-f17a-481b-89c1-35a96f273396","html_url":"https://github.com/redhat-cop/cloud.aws_ops","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":"ansible-collections/collection_template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fcloud.aws_ops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fcloud.aws_ops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fcloud.aws_ops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-cop%2Fcloud.aws_ops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-cop","download_url":"https://codeload.github.com/redhat-cop/cloud.aws_ops/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119296,"owners_count":21050755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["validated-content"],"created_at":"2024-11-13T23:31:03.096Z","updated_at":"2025-04-09T22:02:39.559Z","avatar_url":"https://github.com/redhat-cop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud.aws_ops Validated Content Collection\n\nThis repository hosts the `cloud.aws_ops` Ansible Collection.\n\n## Description\n\nThis collection is curated to provide users with a robust set of roles, playbooks, and rulebooks that simplify and streamline various AWS operations.\n\n## Requirements\n\nThe [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.\n\nTo run rulebooks, [ansible-rulebook](https://ansible.readthedocs.io/projects/rulebook/en/latest/) must be installed.\n\n\u003c!--start requires_ansible--\u003e\n### Ansible version compatibility\n\nThis collection has been tested against following Ansible versions: **\u003e=2.15.0**.\n\n### Included content\n\nClick on the name of a role, playbook, or rulebook to view that content's documentation:\n\n\u003c!--start collection content--\u003e\n### Roles\nName | Description\n--- | ---\n[cloud.aws_ops.aws_setup_credentials](roles/aws_setup_credentials/README.md)|A role to define credentials for aws modules.\n[cloud.aws_ops.awsconfig_detach_and_delete_internet_gateway](roles/awsconfig_detach_and_delete_internet_gateway/README.md)|A role to detach and delete the internet gateway you specify from virtual private cloud.\n[cloud.aws_ops.awsconfig_multiregion_cloudtrail](roles/awsconfig_multiregion_cloudtrail/README.md)|A role to create/delete a Trail for multiple regions.\n[cloud.aws_ops.backup_create_plan](roles/backup_create_plan/README.md)|A role to create an AWS backup plan.\n[cloud.aws_ops.backup_select_resources](roles/backup_select_resources/README.md)|A role to select resources to back up with an existing backup plan.\n[cloud.aws_ops.customized_ami](roles/customized_ami/README.md)|A role to manage custom AMIs on AWS.\n[cloud.aws_ops.ec2_instance_terminate_by_tag](roles/ec2_instance_terminate_by_tag/README.md)|A role to terminate the EC2 instances based on a specific tag you specify.\n[cloud.aws_ops.enable_cloudtrail_encryption_with_kms](roles/enable_cloudtrail_encryption_with_kms/README.md)|A role to encrypt an AWS CloudTrail trail using the AWS Key Management Service (AWS KMS) customer managed key you specify.\n[cloud.aws_ops.manage_vpc_peering](roles/manage_vpc_peering/README.md)|A role to create, delete and accept existing VPC peering connections.\n[cloud.aws_ops.move_objects_between_buckets](roles/move_objects_between_buckets/README.md)|A role to move objects from one bucket to another bucket.\n[cloud.aws_ops.awsconfig_apigateway_with_lambda_integration](roles/awsconfig_apigateway_with_lambda_integration/README.md)|A role to create/delete an API gateway with lambda function integration.\n[cloud.aws_ops.manage_transit_gateway](roles/manage_transit_gateway/README.md)|A role to create/delete transit_gateway with vpc and vpn attachments.\n[cloud.aws_ops.deploy_flask_app](roles/deploy_flask_app/README.md)|A role to deploy a flask web application on AWS.\n[cloud.aws_ops.create_rds_global_cluster](roles/create_rds_global_cluster/README.md)|A role to create, delete aurora global cluster with a primary cluster and a replica cluster in different regions.\n[cloud.aws_ops.clone_on_prem_vm](roles/clone_on_prem_vm/README.md)|A role to clone an existing on prem VM using the KVM hypervisor.\n[cloud.aws_ops.import_image_and_run_aws_instance](roles/import_image_and_run_aws_instance/README.md)|A role that imports a local .raw image into an Amazon Machine Image (AMI) and run an AWS EC2 instance.\n\n### Playbooks\nName | Description\n--- | ---\n[cloud.aws_ops.eda](playbooks/README.md)|A set of playbooks to restore AWS Cloudtrail configurations, created for use with the [cloud.aws_manage_cloudtrail_encryption rulebook](extensions/eda/AWS_MANAGE_CLOUDTRAIL_ENCRYPTION.md).\n[cloud.aws_ops.webapp](playbooks/webapp/README.md)|A set of playbooks to create, delete, or migrate a webapp on AWS.\n[cloud.aws_ops.upload_file_to_s3](playbooks/UPLOAD_FILE_TO_S3.md)|A playbook to upload a local file to S3.\n[cloud.aws_ops.move_vm_from_on_prem_to_aws](playbooks/move_vm_from_on_prem_to_aws/README.md)|A playbook to migrate an existing on prem VM running on KVM hypervisor to AWS.\n\n### Rulebooks\nName | Description\n--- | ---\n[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.\n\u003c!--end collection content--\u003e\n\n## Installation\n\nTo consume this Validated Content from Automation Hub, please ensure that you add the following lines to your ansible.cfg file.\n\n```\n[galaxy]\nserver_list = automation_hub\n\n[galaxy_server.automation_hub]\nurl=https://cloud.redhat.com/api/automation-hub/\nauth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token\ntoken=\u003cSuperSecretToken\u003e\n```\nThe token can be obtained from the [Automation Hub Web UI](https://console.redhat.com/ansible/automation-hub/token).\n\nOnce the above steps are done, you can run the following command to install the collection.\n\n```\nansible-galaxy collection install cloud.aws_ops\n```\n\n## Use Cases\n\nOnce installed, you can reference the cloud.aws_ops collection content by its fully qualified collection name (FQCN), for example:\n\n```yaml\n  # The following example restores encryption to an existing AWS Cloudtrail trail using the enable_cloudtrail_encryption_with_kms role\n  - hosts: all\n    tasks:\n      - name: Include 'enable_cloudtrail_encryption_with_kms' role\n        ansible.builtin.include_role:\n          name: cloud.aws_ops.enable_cloudtrail_encryption_with_kms\n        vars:\n          enable_cloudtrail_encryption_with_kms_trail_name: \"{{ cloudtrail_name }}\"\n          enable_cloudtrail_encryption_with_kms_kms_key_id: \"{{ kms_alias }}\"\n\n  # 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.\n\n  - hosts: all\n    tasks:\n    - name: Import 'cloud.aws_ops.clone_on_prem_vm' role\n      ansible.builtin.import_role:\n        name: cloud.aws_ops.clone_on_prem_vm\n      vars:\n        clone_on_prem_vm_source_vm_name: \"{{ source_vm_name }}\"\n        clone_on_prem_vm_image_name: \"{{ image_name }}\"\n        clone_on_prem_vm_uri: \"{{ uri }}\"\n        clone_on_prem_vm_local_image_path: \"{{ local_image_path }}\"\n        clone_on_prem_vm_overwrite: \"{{ overwrite }}\"\n      delegate_to: kvm\n\n    - name: Import 'cloud.aws_ops.import_image_and_run_aws_instance' role\n      ansible.builtin.import_role:\n        name: cloud.aws_ops.import_image_and_run_aws_instance\n      vars:\n        import_image_and_run_aws_instance_bucket_name: \"{{ bucket_name }}\"\n        import_image_and_run_aws_instance_image_path: \"{{ raw_image_path }}\"\n        import_image_and_run_aws_instance_instance_name: \"{{ instance_name }}\"\n        import_image_and_run_aws_instance_instance_type: \"{{ instance_type }}\"\n        import_image_and_run_aws_instance_import_image_task_name: \"{{ import_image_task_name }}\"\n        import_image_and_run_aws_instance_keypair_name: \"{{ keypair_name }}\"\n```\n\n## Testing\n\nThe project uses `ansible-lint` and `black`.\nAssuming this repository is checked out in the proper structure,\ne.g. `collections_root/ansible_collections/cloud/aws_ops/`, run:\n\n```shell\n  tox -e linters\n```\n\nSanity and unit tests are run as normal:\n\n```shell\n  ansible-test sanity\n```\n\nIf you want to run cloud integration tests, ensure you log in to the cloud:\n\n```shell\n# using the \"default\" profile on AWS\n  aws configure set aws_access_key_id     my-access-key\n  aws configure set aws_secret_access_key my-secret-key\n  aws configure set region                eu-north-1\n\n  ansible-test integration [target]\n```\n\nThis 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).\n\n## Contributing to this collection\n\nWe welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository.\nSee [CONTRIBUTING.md](https://github.com/redhat-cop/cloud.aws_ops/blob/main/CONTRIBUTING.md) for more details.\n\n## Support\n\nFor the latest supported versions, refer to the release notes below.\n\nIf you encounter issues or have questions, you can submit a support request through the following channels:\n - 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/).\n - Ansible Community: Engage with the Ansible community on the Ansible Project Mailing List or [Ansible Forum](https://forum.ansible.com/g/AWS).\n\n## Release Notes\n\nSee the [raw generated changelog](https://github.com/redhat-cop/cloud.aws_ops/blob/main/CHANGELOG.rst).\n\n\n## Related Information\n\n - [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html).\n -  [Ansible Rulebook documentation](https://ansible.readthedocs.io/projects/rulebook/en/stable/index.html).\n - [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)\n\n## License\n\nGNU General Public License v3.0 or later\n\nSee [LICENSE](LICENSE) to see the full text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cop%2Fcloud.aws_ops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-cop%2Fcloud.aws_ops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-cop%2Fcloud.aws_ops/lists"}