mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
5 years ago
|
---
|
||
|
# Try creating without a description
|
||
|
- name: 'Create a subnet group (no description)'
|
||
|
rds_subnet_group:
|
||
|
state: present
|
||
|
name: '{{ resource_prefix }}'
|
||
|
subnets:
|
||
|
- '{{ subnet_ids[0] }}'
|
||
|
- '{{ subnet_ids[1] }}'
|
||
|
ignore_errors: yes
|
||
|
register: create_missing_param
|
||
|
- assert:
|
||
|
that:
|
||
|
- create_missing_param is failed
|
||
|
- "'description' in create_missing_param.msg"
|
||
|
- "\"required for state='present'\" in create_missing_param.msg"
|
||
|
|
||
|
# Try creating without subnets
|
||
|
- name: 'Create a subnet group (no subnets)'
|
||
|
rds_subnet_group:
|
||
|
state: present
|
||
|
name: '{{ resource_prefix }}'
|
||
|
description: '{{ group_description }}'
|
||
|
ignore_errors: yes
|
||
|
register: create_missing_param
|
||
|
- assert:
|
||
|
that:
|
||
|
- create_missing_param is failed
|
||
|
- "'subnets' in create_missing_param.msg"
|
||
|
- "\"required for state='present'\" in create_missing_param.msg"
|
||
|
|
||
|
# XXX This feels like a bad pattern
|
||
|
# Try deleting with subnets
|
||
|
- name: 'Delete a subnet group (with subnets)'
|
||
|
rds_subnet_group:
|
||
|
state: absent
|
||
|
name: '{{ resource_prefix }}'
|
||
|
subnets:
|
||
|
- '{{ subnet_ids[0] }}'
|
||
|
- '{{ subnet_ids[1] }}'
|
||
|
ignore_errors: yes
|
||
|
register: delete_extra_param
|
||
|
- assert:
|
||
|
that:
|
||
|
- delete_extra_param is failed
|
||
|
- "'subnets' in delete_extra_param.msg"
|
||
|
- "\"not allowed for state='absent'\" in delete_extra_param.msg"
|
||
|
|
||
|
# XXX This feels like a bad pattern
|
||
|
# Try deleting with a description
|
||
|
- name: 'Create a subnet group (with description)'
|
||
|
rds_subnet_group:
|
||
|
state: absent
|
||
|
name: '{{ resource_prefix }}'
|
||
|
description: '{{ group_description }}'
|
||
|
ignore_errors: yes
|
||
|
register: delete_extra_param
|
||
|
- assert:
|
||
|
that:
|
||
|
- delete_extra_param is failed
|
||
|
- "'description' in delete_extra_param.msg"
|
||
|
- "\"not allowed for state='absent'\" in delete_extra_param.msg"
|