Skip to content

feat: add cloud dynamic inventory support for AWS, Azure, and GCP #36

Description

@allamiro

Summary

Add the Python SDKs needed to use Ansible's built-in cloud inventory plugins so users can pull live inventory from AWS, Azure, or GCP instead of maintaining a static hosts.ini.

Proposed changes

Dockerfile — add cloud SDKs to pip install layer:

RUN pip3 install --upgrade --no-cache-dir --break-system-packages --ignore-installed \
      boto3 \
      botocore \
      azure-identity \
      azure-mgmt-compute \
      google-auth \
      requests

Usage examples

AWS EC2 dynamic inventory (configs/inventory/aws_ec2.yml):

plugin: amazon.aws.aws_ec2
regions:
  - us-east-1
filters:
  instance-state-name: running
keyed_groups:
  - key: tags.Environment

Run against AWS inventory:

docker exec -it ansible-controller \
  ansible-playbook -i /configs/inventory/aws_ec2.yml /configs/playbooks/site.yml

Why this matters

Most production infrastructure lives in cloud providers. Static inventory files become unmanageable at scale — dynamic inventory automatically reflects the real state of the environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions