Skip to content

Instantly share code, notes, and snippets.

@jonhadfield
Created June 12, 2016 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonhadfield/603bd6b09abdb352bfc2eba359da0a77 to your computer and use it in GitHub Desktop.
Save jonhadfield/603bd6b09abdb352bfc2eba359da0a77 to your computer and use it in GitHub Desktop.
Test ec2_vpc_nat_gateway failures
---
- name: Test VPC NAT Gateway Module
hosts: localhost
connection: local
gather_facts: False
tasks:
- name: test fail with invalid state
ec2_vpc_nat_gateway:
state: notpresent
subnet_id: "subnet-a67643d1"
allocation_id: "eipalloc-a32baec6"
ignore_errors: yes
- name: test fail with state present but subnet id not specified
ec2_vpc_nat_gateway:
state: present
allocation_id: "eipalloc-a32baec6"
ignore_errors: yes
- name: test fail with state present but allocation id not specified
ec2_vpc_nat_gateway:
state: present
subnet_id: "subnet-a67643d1"
ignore_errors: yes
- name: test fail with wait_timeout not an integer
ec2_vpc_nat_gateway:
state: present
subnet_id: "subnet-a67643d1"
allocation_id: "eipalloc-a32baec6"
wait_timeout: three
ignore_errors: yes
- name: test fail with invalid allocation id
ec2_vpc_nat_gateway:
state: present
subnet_id: "subnet-a67643d1"
allocation_id: "eipalloc-incorrect"
wait_timeout: 200
ignore_errors: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment