Ansible role for managing AWS VPCs
Find a file
Julien Dessaux 81f671f7f8
All checks were successful
main / test (push) Successful in 0s
feat(ci): bootstrap forgejo workflow
2026-04-05 23:50:43 +02:00
.forgejo/workflows feat(ci): bootstrap forgejo workflow 2026-04-05 23:50:43 +02:00
defaults feat(role): initial import 2026-03-30 01:24:52 +02:00
meta feat(role): initial import 2026-03-30 01:24:52 +02:00
tasks feat(role): initial import 2026-03-30 01:24:52 +02:00
tests feat(role): initial import 2026-03-30 01:24:52 +02:00
.ansible-lint feat(role): initial import 2026-03-30 01:24:52 +02:00
.gitignore feat(role): initial import 2026-03-30 01:24:52 +02:00
ansible.cfg feat(role): initial import 2026-03-30 01:24:52 +02:00
CHANGELOG.md feat(role): initial import 2026-03-30 01:24:52 +02:00
LICENSE feat(role): initial import 2026-03-30 01:24:52 +02:00
pyproject.toml feat(role): initial import 2026-03-30 01:24:52 +02:00
README.md feat(role): initial import 2026-03-30 01:24:52 +02:00
Taskfile.dist.yaml feat(role): initial import 2026-03-30 01:24:52 +02:00
uv.lock feat(role): initial import 2026-03-30 01:24:52 +02:00

AWS VPC Ansible role

This ansible role handles the setup and teardown of an AWS VPC.

Requirements

  • uv.

Dependencies

See pyproject.toml for the python dependencies and meta/requirements.yaml for the ansible galaxy dependencies.

Role Variables

Required Variables

Variable Description Example
aws_vpc_name Name or name prefix for all resources ansible-role-aws_vpc

Optional Variables

Optional variables and their defaults are in defaults/main.yaml.

Example Playbook

Setup

---
- name: 'Bootstrap the role test environment'
  hosts: 'localhost'
  gather_facts: false
  tasks:
    - name: 'Execute the role main tasks'
      ansible.builtin.include_role:
        name: 'aws_vpc'
      vars:
        aws_vpc_name: 'ansible-role-aws_vpc'

Cleanup

---
- name: 'Cleanup the test environment'
  hosts: 'localhost'
  gather_facts: false
  tasks:
    - name: 'Execute the role cleanup tasks'
      ansible.builtin.include_role:
        name: 'aws_vpc'
        tasks_from: 'cleanup.yaml'
      vars:
        aws_vpc_name: 'ansible-role-aws_vpc'

Testing

Run task check for lintint and task test for ansible playbook testing.