The collection includes a variety of Ansible roles to help troubleshoot AWS Resources.
This collection has been tested against following Ansible versions: >=2.14.0.
Click on the name of a role to view that content's documentation:
Name | Description |
---|---|
cloud.aws_troubleshooting.aws_setup_credentials | A role to define credentials for aws modules. |
cloud.aws_troubleshooting.connectivity_troubleshooter | A role to troubleshoot connectivity issues between the following: a) AWS resources within an Amazon Virtual Private Cloud (Amazon VPC); b) AWS resources in different Amazon VPCs within the same AWS Region that are connected using VPC peering; c) AWS resources in an Amazon VPC and an internet resource using an internet gateway; d) AWS resources in an Amazon VPC and an internet resource using a network address translation (NAT) gateway. |
cloud.aws_troubleshooting.connectivity_troubleshooter_igw | A role to troubleshoot connectivity issues between AWS resources in an Amazon VPC and an internet resource using an internet gateway. |
cloud.aws_troubleshooting.connectivity_troubleshooter_local | A role to troubleshoot connectivity issues between AWS resources within an Amazon Virtual Private Cloud (Amazon VPC). |
cloud.aws_troubleshooting.connectivity_troubleshooter_nat | A role to troubleshoot connectivity issues between AWS resources in an Amazon VPC and an internet resource using a network address translation (NAT) gateway. |
cloud.aws_troubleshooting.connectivity_troubleshooter_peering | A role to troubleshoot connectivity issues between AWS resources in different Amazon VPCs within the same AWS Region that are connected using VPC peering. |
cloud.aws_troubleshooting.connectivity_troubleshooter_validate | A role to validate input parameters for troubleshoot_connectivity_* roles and return connection next hop. |
cloud.aws_troubleshooting.troubleshoot_rds_connectivity | A role to troubleshoot RDS connectivity from an EC2 instance. |
The amazon.aws and community.aws collections MUST be installed in order for this collection to work.
To consume this Validated Content from Automation Hub, please ensure that you add the following lines to your ansible.cfg file.
[galaxy]
server_list = automation_hub
[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<SuperSecretToken>
The token can be obtained from the Automation Hub Web UI.
Once the above steps are done, you can run the following command to install the collection.
ansible-galaxy collection install cloud.aws_troubleshooting
Once installed, you can reference the cloud.aws_troubleshooting collection content by its fully qualified collection name (FQCN), for example:
- hosts: all
tasks:
- name: Include 'cloud.aws_troubleshooting.connectivity_troubleshooter' role
ansible.builtin.include_role:
name: cloud.aws_troubleshooting.connectivity_troubleshooter
vars:
connectivity_troubleshooter_destination_ip: "{{ ip_instance_2 }}"
connectivity_troubleshooter_destination_port: 80
connectivity_troubleshooter_source_ip: "{{ ip_instance_1 }}"
- Ansible Using collections for more details.
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against this collection repository.
The project uses ansible-lint
and black
.
Assuming this repository is checked out in the proper structure,
e.g. collections_root/ansible_collections/cloud/aws_troubleshooting/
, run:
tox -e linters
Sanity and unit tests are run as normal:
ansible-test sanity
If you want to run cloud integration tests, ensure you log in to the cloud:
# using the "default" profile on AWS
aws configure set aws_access_key_id my-access-key
aws configure set aws_secret_access_key my-secret-key
aws configure set region eu-north-1
ansible-test integration [target]
This collection is tested using GitHub Actions. To know more about CI, refer to CI.md.
GNU General Public License v3.0 or later See LICENSE to see the full text.