| 1 |
--- |
| 2 |
- name: Rds_option_group tests |
| 3 |
module_defaults: |
| 4 |
group/aws: |
| 5 |
region: "{{ aws_region }}" |
| 6 |
access_key: "{{ aws_access_key }}" |
| 7 |
secret_key: "{{ aws_secret_key }}" |
| 8 |
session_token: "{{ security_token | default(omit) }}" |
| 9 |
|
| 10 |
block: |
| 11 |
- name: Create a VPC |
| 12 |
amazon.aws.ec2_vpc_net: |
| 13 |
name: "{{ vpc_name }}" |
| 14 |
state: present |
| 15 |
cidr_block: "{{ vpc_cidr }}" |
| 16 |
register: vpc_result |
| 17 |
|
| 18 |
- name: Assert success |
| 19 |
ansible.builtin.assert: |
| 20 |
that: |
| 21 |
- vpc_result is successful |
| 22 |
- '"vpc" in vpc_result' |
| 23 |
- '"cidr_block" in vpc_result.vpc' |
| 24 |
- vpc_result.vpc.cidr_block == vpc_cidr |
| 25 |
- '"id" in vpc_result.vpc' |
| 26 |
- vpc_result.vpc.id.startswith("vpc-") |
| 27 |
- '"state" in vpc_result.vpc' |
| 28 |
- vpc_result.vpc.state == 'available' |
| 29 |
- '"tags" in vpc_result.vpc' |
| 30 |
|
| 31 |
- name: "Set fact: VPC ID" |
| 32 |
ansible.builtin.set_fact: |
| 33 |
vpc_id: "{{ vpc_result.vpc.id }}" |
| 34 |
|
| 35 |
- name: Create subnet |
| 36 |
amazon.aws.ec2_vpc_subnet: |
| 37 |
cidr: "{{ subnet_cidr }}" |
| 38 |
vpc_id: "{{ vpc_id }}" |
| 39 |
state: present |
| 40 |
register: subnet_result |
| 41 |
|
| 42 |
- name: Assert success |
| 43 |
ansible.builtin.assert: |
| 44 |
that: |
| 45 |
- subnet_result is successful |
| 46 |
- '"subnet" in subnet_result' |
| 47 |
- '"cidr_block" in subnet_result.subnet' |
| 48 |
- subnet_result.subnet.cidr_block == subnet_cidr |
| 49 |
- '"id" in subnet_result.subnet' |
| 50 |
- subnet_result.subnet.id.startswith("subnet-") |
| 51 |
- '"state" in subnet_result.subnet' |
| 52 |
- subnet_result.subnet.state == 'available' |
| 53 |
- '"tags" in subnet_result.subnet' |
| 54 |
- subnet_result.subnet.vpc_id == vpc_id |
| 55 |
|
| 56 |
- name: "Set fact: VPC subnet ID" |
| 57 |
ansible.builtin.set_fact: |
| 58 |
subnet_id: "{{ subnet_result.subnet.id }}" |
| 59 |
|
| 60 |
- name: Create security groups |
| 61 |
amazon.aws.ec2_security_group: |
| 62 |
name: "{{ item }}" |
| 63 |
description: created by rds_instance integration tests |
| 64 |
state: present |
| 65 |
vpc_id: "{{ vpc_id }}" |
| 66 |
register: sgs_result |
| 67 |
loop: |
| 68 |
- "{{ sg_1_name }}" |
| 69 |
- "{{ sg_2_name }}" |
| 70 |
- "{{ sg_3_name }}" |
| 71 |
|
| 72 |
- name: Assert success |
| 73 |
ansible.builtin.assert: |
| 74 |
that: |
| 75 |
- sgs_result is successful |
| 76 |
|
| 77 |
- name: "Set fact: security groups ID" |
| 78 |
ansible.builtin.set_fact: |
| 79 |
sg_1: "{{ sgs_result.results.0.group_id }}" |
| 80 |
sg_2: "{{ sgs_result.results.1.group_id }}" |
| 81 |
sg_3: "{{ sgs_result.results.2.group_id }}" |
| 82 |
|
| 83 |
- name: List all the option groups - CHECK_MODE |
| 84 |
amazon.aws.rds_option_group_info: |
| 85 |
register: option_groups_result |
| 86 |
check_mode: true |
| 87 |
|
| 88 |
- name: Assert success - CHECK_MODE |
| 89 |
ansible.builtin.assert: |
| 90 |
that: |
| 91 |
- option_groups_result is successful |
| 92 |
|
| 93 |
- name: List all the option groups |
| 94 |
amazon.aws.rds_option_group_info: |
| 95 |
register: option_groups_result |
| 96 |
check_mode: true |
| 97 |
|
| 98 |
- name: Assert success |
| 99 |
ansible.builtin.assert: |
| 100 |
that: |
| 101 |
- option_groups_result is successful |
| 102 |
|
| 103 |
- name: Create an RDS Mysql option group - CHECK_MODE |
| 104 |
amazon.aws.rds_option_group: |
| 105 |
state: present |
| 106 |
option_group_name: "{{ option_group_name }}" |
| 107 |
engine_name: "{{ engine_name }}" |
| 108 |
major_engine_version: "{{ major_engine_version }}" |
| 109 |
option_group_description: "{{ option_group_description }}" |
| 110 |
apply_immediately: true |
| 111 |
options: |
| 112 |
- option_name: MEMCACHED |
| 113 |
port: 11211 |
| 114 |
vpc_security_group_memberships: |
| 115 |
- "{{ sg_1 }}" |
| 116 |
option_settings: |
| 117 |
- name: MAX_SIMULTANEOUS_CONNECTIONS |
| 118 |
value: "20" |
| 119 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 120 |
value: "1.25" |
| 121 |
check_mode: true |
| 122 |
register: new_rds_mysql_option_group |
| 123 |
|
| 124 |
- name: Assert success - CHECK_MODE |
| 125 |
ansible.builtin.assert: |
| 126 |
that: |
| 127 |
- new_rds_mysql_option_group.changed |
| 128 |
|
| 129 |
- name: Create an RDS Mysql option group |
| 130 |
amazon.aws.rds_option_group: |
| 131 |
state: present |
| 132 |
option_group_name: "{{ option_group_name }}" |
| 133 |
engine_name: "{{ engine_name }}" |
| 134 |
major_engine_version: "{{ major_engine_version }}" |
| 135 |
option_group_description: "{{ option_group_description }}" |
| 136 |
apply_immediately: true |
| 137 |
options: |
| 138 |
- option_name: MEMCACHED |
| 139 |
port: 11211 |
| 140 |
vpc_security_group_memberships: |
| 141 |
- "{{ sg_1 }}" |
| 142 |
option_settings: |
| 143 |
- name: MAX_SIMULTANEOUS_CONNECTIONS |
| 144 |
value: "20" |
| 145 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 146 |
value: "1.25" |
| 147 |
register: new_rds_mysql_option_group |
| 148 |
|
| 149 |
- name: Validate return values |
| 150 |
ansible.builtin.assert: |
| 151 |
that: |
| 152 |
- new_rds_mysql_option_group.changed |
| 153 |
- "'engine_name' in new_rds_mysql_option_group" |
| 154 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 155 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 156 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 157 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 158 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 159 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 160 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 161 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 162 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 163 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 164 |
- "'options' in new_rds_mysql_option_group" |
| 165 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 166 |
- "'option_name' in option" |
| 167 |
- option.option_name == "MEMCACHED" |
| 168 |
- "'permanent' in option" |
| 169 |
- "'persistent' in option" |
| 170 |
- "'port' in option" |
| 171 |
- option.port == 11211 |
| 172 |
- "'vpc_security_group_memberships' in option" |
| 173 |
- (option.vpc_security_group_memberships | length) == 1 |
| 174 |
- option.vpc_security_group_memberships[0].vpc_security_group_id == sg_1 |
| 175 |
- "'option_settings' in option" |
| 176 |
- (option_settings | length) > 0 |
| 177 |
- option_settings | selectattr('name','equalto','MAX_SIMULTANEOUS_CONNECTIONS') | list | count > 0 |
| 178 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 179 |
vars: |
| 180 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 181 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 182 |
|
| 183 |
- name: List specific option group |
| 184 |
amazon.aws.rds_option_group_info: |
| 185 |
option_group_name: "{{ option_group_name }}" |
| 186 |
register: option_groups_result |
| 187 |
|
| 188 |
- name: Assert success |
| 189 |
ansible.builtin.assert: |
| 190 |
that: |
| 191 |
- option_groups_result is successful |
| 192 |
- (option_groups_result.result | length) == 1 |
| 193 |
- "'engine_name' in option_groups_list" |
| 194 |
- option_groups_list.engine_name == engine_name |
| 195 |
- "'major_engine_version' in option_groups_list" |
| 196 |
- (option_groups_list.major_engine_version | string) == (major_engine_version | string) |
| 197 |
- "'option_group_arn' in option_groups_list" |
| 198 |
- "'option_group_description' in option_groups_list" |
| 199 |
- option_groups_list.option_group_description == option_group_description |
| 200 |
- "'option_group_name' in option_groups_list" |
| 201 |
- option_groups_list.option_group_name == option_group_name |
| 202 |
- "'vpc_id' in option_groups_list" |
| 203 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 204 |
- "'options' in option_groups_list" |
| 205 |
- (option_groups_list.options | length) > 0 |
| 206 |
- "'option_name' in options" |
| 207 |
- options.option_name == "MEMCACHED" |
| 208 |
- "'permanent' in options" |
| 209 |
- "'persistent' in options" |
| 210 |
- "'port' in options" |
| 211 |
- options.port == 11211 |
| 212 |
- "'vpc_security_group_memberships' in options" |
| 213 |
- (options.vpc_security_group_memberships | length) == 1 |
| 214 |
- options.vpc_security_group_memberships[0].vpc_security_group_id == sg_1 |
| 215 |
- "'option_settings' in options" |
| 216 |
- (options.option_settings | length) > 0 |
| 217 |
vars: |
| 218 |
option_groups_list: "{{ option_groups_result.result[0] }}" |
| 219 |
options: "{{ option_groups_result.result[0].options[0] }}" |
| 220 |
|
| 221 |
- name: Create an RDS Mysql option group (idempotency) - CHECK_MODE |
| 222 |
amazon.aws.rds_option_group: |
| 223 |
state: present |
| 224 |
option_group_name: "{{ option_group_name }}" |
| 225 |
engine_name: "{{ engine_name }}" |
| 226 |
major_engine_version: "{{ major_engine_version }}" |
| 227 |
option_group_description: "{{ option_group_description }}" |
| 228 |
apply_immediately: true |
| 229 |
options: |
| 230 |
- option_name: MEMCACHED |
| 231 |
port: 11211 |
| 232 |
vpc_security_group_memberships: |
| 233 |
- "{{ sg_1 }}" |
| 234 |
option_settings: |
| 235 |
- name: MAX_SIMULTANEOUS_CONNECTIONS |
| 236 |
value: "20" |
| 237 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 238 |
value: "1.25" |
| 239 |
check_mode: true |
| 240 |
register: new_rds_mysql_option_group |
| 241 |
|
| 242 |
- name: Assert success - CHECK_MODE |
| 243 |
ansible.builtin.assert: |
| 244 |
that: |
| 245 |
- not new_rds_mysql_option_group.changed |
| 246 |
- "'engine_name' in new_rds_mysql_option_group" |
| 247 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 248 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 249 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 250 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 251 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 252 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 253 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 254 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 255 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 256 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 257 |
- "'options' in new_rds_mysql_option_group" |
| 258 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 259 |
- "'option_name' in option" |
| 260 |
- option.option_name == "MEMCACHED" |
| 261 |
- "'permanent' in option" |
| 262 |
- "'persistent' in option" |
| 263 |
- "'port' in option" |
| 264 |
- option.port == 11211 |
| 265 |
- "'vpc_security_group_memberships' in option" |
| 266 |
- (option.vpc_security_group_memberships | length) == 1 |
| 267 |
- option.vpc_security_group_memberships[0].vpc_security_group_id == sg_1 |
| 268 |
- "'option_settings' in option" |
| 269 |
- (option_settings | length) > 0 |
| 270 |
- option_settings | selectattr('name','equalto','MAX_SIMULTANEOUS_CONNECTIONS') | list | count > 0 |
| 271 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 272 |
vars: |
| 273 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 274 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 275 |
|
| 276 |
- name: Create an RDS Mysql option group (idempotency) |
| 277 |
amazon.aws.rds_option_group: |
| 278 |
state: present |
| 279 |
option_group_name: "{{ option_group_name }}" |
| 280 |
engine_name: "{{ engine_name }}" |
| 281 |
major_engine_version: "{{ major_engine_version }}" |
| 282 |
option_group_description: "{{ option_group_description }}" |
| 283 |
apply_immediately: true |
| 284 |
options: |
| 285 |
- option_name: MEMCACHED |
| 286 |
port: 11211 |
| 287 |
vpc_security_group_memberships: |
| 288 |
- "{{ sg_1 }}" |
| 289 |
option_settings: |
| 290 |
- name: MAX_SIMULTANEOUS_CONNECTIONS |
| 291 |
value: "20" |
| 292 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 293 |
value: "1.25" |
| 294 |
register: new_rds_mysql_option_group |
| 295 |
|
| 296 |
- name: Validate return values |
| 297 |
ansible.builtin.assert: |
| 298 |
that: |
| 299 |
- not new_rds_mysql_option_group.changed |
| 300 |
- "'engine_name' in new_rds_mysql_option_group" |
| 301 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 302 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 303 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 304 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 305 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 306 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 307 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 308 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 309 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 310 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 311 |
- "'options' in new_rds_mysql_option_group" |
| 312 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 313 |
- "'option_name' in option" |
| 314 |
- option.option_name == "MEMCACHED" |
| 315 |
- "'permanent' in option" |
| 316 |
- "'persistent' in option" |
| 317 |
- "'port' in option" |
| 318 |
- option.port == 11211 |
| 319 |
- "'vpc_security_group_memberships' in option" |
| 320 |
- (option.vpc_security_group_memberships | length) == 1 |
| 321 |
- option.vpc_security_group_memberships[0].vpc_security_group_id == sg_1 |
| 322 |
- "'option_settings' in option" |
| 323 |
- (option_settings | length) > 0 |
| 324 |
- option_settings | selectattr('name','equalto','MAX_SIMULTANEOUS_CONNECTIONS') | list | count > 0 |
| 325 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 326 |
vars: |
| 327 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 328 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 329 |
|
| 330 |
- name: List option groups with specific (engine_name and major_engine_version) |
| 331 |
amazon.aws.rds_option_group_info: |
| 332 |
engine_name: "{{ engine_name }}" |
| 333 |
major_engine_version: "{{ major_engine_version }}" |
| 334 |
register: option_groups_result |
| 335 |
|
| 336 |
- name: Assert success |
| 337 |
ansible.builtin.assert: |
| 338 |
that: |
| 339 |
- option_groups_result is successful |
| 340 |
- (option_groups_result.result | length) > 0 |
| 341 |
|
| 342 |
- name: Create an RDS Mysql option group - apply different changes (expected changed=true) |
| 343 |
amazon.aws.rds_option_group: |
| 344 |
state: present |
| 345 |
option_group_name: "{{ option_group_name }}" |
| 346 |
engine_name: "{{ engine_name }}" |
| 347 |
major_engine_version: "{{ major_engine_version }}" |
| 348 |
option_group_description: "{{ option_group_description }}" |
| 349 |
apply_immediately: true |
| 350 |
options: |
| 351 |
- option_name: MEMCACHED |
| 352 |
port: 11211 |
| 353 |
vpc_security_group_memberships: |
| 354 |
- "{{ sg_1 }}" |
| 355 |
- "{{ sg_2 }}" |
| 356 |
- "{{ sg_3 }}" |
| 357 |
option_settings: |
| 358 |
- name: MAX_SIMULTANEOUS_CONNECTIONS |
| 359 |
value: "30" |
| 360 |
register: new_rds_mysql_option_group |
| 361 |
|
| 362 |
- name: Validate return values |
| 363 |
ansible.builtin.assert: |
| 364 |
that: |
| 365 |
- new_rds_mysql_option_group.changed |
| 366 |
- "'engine_name' in new_rds_mysql_option_group" |
| 367 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 368 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 369 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 370 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 371 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 372 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 373 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 374 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 375 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 376 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 377 |
- "'options' in new_rds_mysql_option_group" |
| 378 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 379 |
- "'option_name' in option" |
| 380 |
- option.option_name == "MEMCACHED" |
| 381 |
- "'permanent' in option" |
| 382 |
- "'persistent' in option" |
| 383 |
- "'port' in option" |
| 384 |
- option.port == 11211 |
| 385 |
- "'vpc_security_group_memberships' in option" |
| 386 |
- (option.vpc_security_group_memberships | length) == 3 |
| 387 |
- "'option_settings' in option" |
| 388 |
- (option_settings | length) > 0 |
| 389 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 390 |
vars: |
| 391 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 392 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 393 |
|
| 394 |
- name: Get info about an option group - CHECK_MODE |
| 395 |
amazon.aws.rds_option_group_info: |
| 396 |
option_group_name: "{{ option_group_name }}" |
| 397 |
check_mode: true |
| 398 |
register: option_groups_result |
| 399 |
|
| 400 |
- name: Assert success - CHECK_MODE |
| 401 |
ansible.builtin.assert: |
| 402 |
that: |
| 403 |
- option_groups_result is successful |
| 404 |
- (option_groups_result.result | length) == 1 |
| 405 |
- "'engine_name' in option_groups_list" |
| 406 |
- option_groups_list.engine_name == engine_name |
| 407 |
- "'major_engine_version' in option_groups_list" |
| 408 |
- (option_groups_list.major_engine_version | string) == (major_engine_version | string) |
| 409 |
- "'option_group_arn' in option_groups_list" |
| 410 |
- "'option_group_description' in option_groups_list" |
| 411 |
- option_groups_list.option_group_description == option_group_description |
| 412 |
- "'option_group_name' in option_groups_list" |
| 413 |
- option_groups_list.option_group_name == option_group_name |
| 414 |
- "'vpc_id' in option_groups_list" |
| 415 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 416 |
- "'options' in option_groups_list" |
| 417 |
- (option_groups_list.options | length) > 0 |
| 418 |
- "'option_name' in options" |
| 419 |
- options.option_name == "MEMCACHED" |
| 420 |
- "'permanent' in options" |
| 421 |
- "'persistent' in options" |
| 422 |
- "'port' in options" |
| 423 |
- options.port == 11211 |
| 424 |
- "'vpc_security_group_memberships' in options" |
| 425 |
- (options.vpc_security_group_memberships | length) == 3 |
| 426 |
- "'option_settings' in options" |
| 427 |
- (options.option_settings | length) > 0 |
| 428 |
vars: |
| 429 |
option_groups_list: "{{ option_groups_result.result[0] }}" |
| 430 |
options: "{{ option_groups_result.result[0].options[0] }}" |
| 431 |
|
| 432 |
- name: RDS Mysql option group - apply tags - CHECK_MODE |
| 433 |
amazon.aws.rds_option_group: |
| 434 |
state: present |
| 435 |
option_group_name: "{{ option_group_name }}" |
| 436 |
engine_name: "{{ engine_name }}" |
| 437 |
major_engine_version: "{{ major_engine_version }}" |
| 438 |
option_group_description: "{{ option_group_description }}" |
| 439 |
apply_immediately: true |
| 440 |
options: |
| 441 |
- option_name: MEMCACHED |
| 442 |
port: 11211 |
| 443 |
vpc_security_group_memberships: |
| 444 |
- "{{ sg_1 }}" |
| 445 |
- "{{ sg_2 }}" |
| 446 |
- "{{ sg_3 }}" |
| 447 |
option_settings: |
| 448 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 449 |
value: "1.2" |
| 450 |
tags: |
| 451 |
tag_one: "{{ option_group_name }} One" |
| 452 |
Tag Two: two {{ option_group_name }} |
| 453 |
check_mode: true |
| 454 |
register: new_rds_mysql_option_group |
| 455 |
|
| 456 |
- name: Assert success - CHECK_MODE |
| 457 |
ansible.builtin.assert: |
| 458 |
that: |
| 459 |
- new_rds_mysql_option_group.changed |
| 460 |
- "'engine_name' in new_rds_mysql_option_group" |
| 461 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 462 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 463 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 464 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 465 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 466 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 467 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 468 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 469 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 470 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 471 |
- "'tags' in new_rds_mysql_option_group" |
| 472 |
- "'options' in new_rds_mysql_option_group" |
| 473 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 474 |
- "'option_name' in option" |
| 475 |
- option.option_name == "MEMCACHED" |
| 476 |
- "'permanent' in option" |
| 477 |
- "'persistent' in option" |
| 478 |
- "'port' in option" |
| 479 |
- option.port == 11211 |
| 480 |
- "'vpc_security_group_memberships' in option" |
| 481 |
- (option.vpc_security_group_memberships | length) == 3 |
| 482 |
- "'option_settings' in option" |
| 483 |
- (option_settings | length) > 0 |
| 484 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 485 |
vars: |
| 486 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 487 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 488 |
|
| 489 |
- name: RDS Mysql option group - apply tags |
| 490 |
amazon.aws.rds_option_group: |
| 491 |
state: present |
| 492 |
option_group_name: "{{ option_group_name }}" |
| 493 |
engine_name: "{{ engine_name }}" |
| 494 |
major_engine_version: "{{ major_engine_version }}" |
| 495 |
option_group_description: "{{ option_group_description }}" |
| 496 |
apply_immediately: true |
| 497 |
options: |
| 498 |
- option_name: MEMCACHED |
| 499 |
port: 11211 |
| 500 |
vpc_security_group_memberships: |
| 501 |
- "{{ sg_1 }}" |
| 502 |
- "{{ sg_2 }}" |
| 503 |
- "{{ sg_3 }}" |
| 504 |
option_settings: |
| 505 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 506 |
value: "1.2" |
| 507 |
tags: |
| 508 |
tag_one: "{{ option_group_name }} One" |
| 509 |
Tag Two: two {{ option_group_name }} |
| 510 |
register: new_rds_mysql_option_group |
| 511 |
|
| 512 |
- name: Validate return values |
| 513 |
ansible.builtin.assert: |
| 514 |
that: |
| 515 |
- new_rds_mysql_option_group.changed |
| 516 |
- "'engine_name' in new_rds_mysql_option_group" |
| 517 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 518 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 519 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 520 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 521 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 522 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 523 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 524 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 525 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 526 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 527 |
- "'tags' in new_rds_mysql_option_group" |
| 528 |
- new_rds_mysql_option_group.tags == option_tags |
| 529 |
- "'options' in new_rds_mysql_option_group" |
| 530 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 531 |
- "'option_name' in option" |
| 532 |
- option.option_name == "MEMCACHED" |
| 533 |
- "'permanent' in option" |
| 534 |
- "'persistent' in option" |
| 535 |
- "'port' in option" |
| 536 |
- option.port == 11211 |
| 537 |
- "'vpc_security_group_memberships' in option" |
| 538 |
- (option.vpc_security_group_memberships | length) == 3 |
| 539 |
- "'option_settings' in option" |
| 540 |
- (option_settings | length) > 0 |
| 541 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 542 |
vars: |
| 543 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 544 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 545 |
option_tags: |
| 546 |
tag_one: "{{ option_group_name }} One" |
| 547 |
Tag Two: two {{ option_group_name }} |
| 548 |
|
| 549 |
- name: RDS Mysql option group - apply tags (idempotency) |
| 550 |
amazon.aws.rds_option_group: |
| 551 |
state: present |
| 552 |
option_group_name: "{{ option_group_name }}" |
| 553 |
engine_name: "{{ engine_name }}" |
| 554 |
major_engine_version: "{{ major_engine_version }}" |
| 555 |
option_group_description: "{{ option_group_description }}" |
| 556 |
apply_immediately: true |
| 557 |
options: |
| 558 |
- option_name: MEMCACHED |
| 559 |
port: 11211 |
| 560 |
vpc_security_group_memberships: |
| 561 |
- "{{ sg_1 }}" |
| 562 |
- "{{ sg_2 }}" |
| 563 |
- "{{ sg_3 }}" |
| 564 |
option_settings: |
| 565 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 566 |
value: "1.2" |
| 567 |
tags: |
| 568 |
tag_one: "{{ option_group_name }} One" |
| 569 |
Tag Two: two {{ option_group_name }} |
| 570 |
register: new_rds_mysql_option_group |
| 571 |
|
| 572 |
- name: Validate return values |
| 573 |
ansible.builtin.assert: |
| 574 |
that: |
| 575 |
- not new_rds_mysql_option_group.changed |
| 576 |
- "'engine_name' in new_rds_mysql_option_group" |
| 577 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 578 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 579 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 580 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 581 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 582 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 583 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 584 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 585 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 586 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 587 |
- "'tags' in new_rds_mysql_option_group" |
| 588 |
- new_rds_mysql_option_group.tags == option_tags |
| 589 |
- "'options' in new_rds_mysql_option_group" |
| 590 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 591 |
- "'option_name' in option" |
| 592 |
- option.option_name == "MEMCACHED" |
| 593 |
- "'permanent' in option" |
| 594 |
- "'persistent' in option" |
| 595 |
- "'port' in option" |
| 596 |
- option.port == 11211 |
| 597 |
- "'vpc_security_group_memberships' in option" |
| 598 |
- (option.vpc_security_group_memberships | length) == 3 |
| 599 |
- "'option_settings' in option" |
| 600 |
- (option_settings | length) > 0 |
| 601 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 602 |
vars: |
| 603 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 604 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 605 |
option_tags: |
| 606 |
tag_one: "{{ option_group_name }} One" |
| 607 |
Tag Two: two {{ option_group_name }} |
| 608 |
|
| 609 |
- name: RDS Mysql option group - update tags |
| 610 |
amazon.aws.rds_option_group: |
| 611 |
state: present |
| 612 |
option_group_name: "{{ option_group_name }}" |
| 613 |
engine_name: "{{ engine_name }}" |
| 614 |
major_engine_version: "{{ major_engine_version }}" |
| 615 |
option_group_description: "{{ option_group_description }}" |
| 616 |
apply_immediately: true |
| 617 |
options: |
| 618 |
- option_name: MEMCACHED |
| 619 |
port: 11211 |
| 620 |
vpc_security_group_memberships: |
| 621 |
- "{{ sg_1 }}" |
| 622 |
- "{{ sg_2 }}" |
| 623 |
- "{{ sg_3 }}" |
| 624 |
option_settings: |
| 625 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 626 |
value: "1.2" |
| 627 |
tags: |
| 628 |
tag_three: "{{ option_group_name }} Three" |
| 629 |
Tag Two: two {{ option_group_name }} |
| 630 |
register: new_rds_mysql_option_group |
| 631 |
|
| 632 |
- name: Validate return values |
| 633 |
ansible.builtin.assert: |
| 634 |
that: |
| 635 |
- new_rds_mysql_option_group.changed |
| 636 |
- "'engine_name' in new_rds_mysql_option_group" |
| 637 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 638 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 639 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 640 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 641 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 642 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 643 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 644 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 645 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 646 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 647 |
- "'tags' in new_rds_mysql_option_group" |
| 648 |
- new_rds_mysql_option_group.tags == option_tags |
| 649 |
- "'options' in new_rds_mysql_option_group" |
| 650 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 651 |
- "'option_name' in option" |
| 652 |
- option.option_name == "MEMCACHED" |
| 653 |
- "'permanent' in option" |
| 654 |
- "'persistent' in option" |
| 655 |
- "'port' in option" |
| 656 |
- option.port == 11211 |
| 657 |
- "'vpc_security_group_memberships' in option" |
| 658 |
- (option.vpc_security_group_memberships | length) == 3 |
| 659 |
- "'option_settings' in option" |
| 660 |
- (option_settings | length) > 0 |
| 661 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 662 |
vars: |
| 663 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 664 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 665 |
option_tags: |
| 666 |
tag_three: "{{ option_group_name }} Three" |
| 667 |
Tag Two: two {{ option_group_name }} |
| 668 |
|
| 669 |
- name: RDS Mysql option group - update tags without purge (expected changed=true) |
| 670 |
amazon.aws.rds_option_group: |
| 671 |
state: present |
| 672 |
option_group_name: "{{ option_group_name }}" |
| 673 |
engine_name: "{{ engine_name }}" |
| 674 |
major_engine_version: "{{ major_engine_version }}" |
| 675 |
option_group_description: "{{ option_group_description }}" |
| 676 |
apply_immediately: true |
| 677 |
options: |
| 678 |
- option_name: MEMCACHED |
| 679 |
port: 11211 |
| 680 |
vpc_security_group_memberships: |
| 681 |
- "{{ sg_1 }}" |
| 682 |
- "{{ sg_2 }}" |
| 683 |
- "{{ sg_3 }}" |
| 684 |
option_settings: |
| 685 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 686 |
value: "1.2" |
| 687 |
purge_tags: false |
| 688 |
tags: |
| 689 |
tag_one: "{{ option_group_name }} One" |
| 690 |
register: new_rds_mysql_option_group |
| 691 |
|
| 692 |
- name: Validate return values |
| 693 |
ansible.builtin.assert: |
| 694 |
that: |
| 695 |
- new_rds_mysql_option_group.changed |
| 696 |
- "'engine_name' in new_rds_mysql_option_group" |
| 697 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 698 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 699 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 700 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 701 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 702 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 703 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 704 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 705 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 706 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 707 |
- "'tags' in new_rds_mysql_option_group" |
| 708 |
- new_rds_mysql_option_group.tags == option_tags |
| 709 |
- "'options' in new_rds_mysql_option_group" |
| 710 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 711 |
- "'option_name' in option" |
| 712 |
- option.option_name == "MEMCACHED" |
| 713 |
- "'permanent' in option" |
| 714 |
- "'persistent' in option" |
| 715 |
- "'port' in option" |
| 716 |
- option.port == 11211 |
| 717 |
- "'vpc_security_group_memberships' in option" |
| 718 |
- (option.vpc_security_group_memberships | length) == 3 |
| 719 |
- "'option_settings' in option" |
| 720 |
- (option_settings | length) > 0 |
| 721 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 722 |
vars: |
| 723 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 724 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 725 |
option_tags: |
| 726 |
tag_one: "{{ option_group_name }} One" |
| 727 |
Tag Two: two {{ option_group_name }} |
| 728 |
tag_three: "{{ option_group_name }} Three" |
| 729 |
|
| 730 |
- name: RDS Mysql option group - update with CamelCase tags (expected changed=true) |
| 731 |
amazon.aws.rds_option_group: |
| 732 |
state: present |
| 733 |
option_group_name: "{{ option_group_name }}" |
| 734 |
engine_name: "{{ engine_name }}" |
| 735 |
major_engine_version: "{{ major_engine_version }}" |
| 736 |
option_group_description: "{{ option_group_description }}" |
| 737 |
apply_immediately: true |
| 738 |
options: |
| 739 |
- option_name: MEMCACHED |
| 740 |
port: 11211 |
| 741 |
vpc_security_group_memberships: |
| 742 |
- "{{ sg_1 }}" |
| 743 |
- "{{ sg_2 }}" |
| 744 |
- "{{ sg_3 }}" |
| 745 |
option_settings: |
| 746 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 747 |
value: "1.2" |
| 748 |
tags: |
| 749 |
lowercase spaced: hello cruel world |
| 750 |
Title Case: Hello Cruel World |
| 751 |
CamelCase: SimpleCamelCase |
| 752 |
snake_case: simple_snake_case |
| 753 |
register: new_rds_mysql_option_group |
| 754 |
|
| 755 |
- name: Validate return values |
| 756 |
ansible.builtin.assert: |
| 757 |
that: |
| 758 |
- new_rds_mysql_option_group.changed |
| 759 |
- "'engine_name' in new_rds_mysql_option_group" |
| 760 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 761 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 762 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 763 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 764 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 765 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 766 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 767 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 768 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 769 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 770 |
- "'tags' in new_rds_mysql_option_group" |
| 771 |
- new_rds_mysql_option_group.tags == option_tags |
| 772 |
- "'options' in new_rds_mysql_option_group" |
| 773 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 774 |
- "'option_name' in option" |
| 775 |
- option.option_name == "MEMCACHED" |
| 776 |
- "'permanent' in option" |
| 777 |
- "'persistent' in option" |
| 778 |
- "'port' in option" |
| 779 |
- option.port == 11211 |
| 780 |
- "'vpc_security_group_memberships' in option" |
| 781 |
- (option.vpc_security_group_memberships | length) == 3 |
| 782 |
- "'option_settings' in option" |
| 783 |
- (option_settings | length) > 0 |
| 784 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 785 |
vars: |
| 786 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 787 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 788 |
option_tags: |
| 789 |
lowercase spaced: hello cruel world |
| 790 |
Title Case: Hello Cruel World |
| 791 |
CamelCase: SimpleCamelCase |
| 792 |
snake_case: simple_snake_case |
| 793 |
|
| 794 |
- name: RDS Mysql option group - do not specify any tag to ensure previous tags are not removed |
| 795 |
amazon.aws.rds_option_group: |
| 796 |
state: present |
| 797 |
option_group_name: "{{ option_group_name }}" |
| 798 |
engine_name: "{{ engine_name }}" |
| 799 |
major_engine_version: "{{ major_engine_version }}" |
| 800 |
option_group_description: "{{ option_group_description }}" |
| 801 |
apply_immediately: true |
| 802 |
options: |
| 803 |
- option_name: MEMCACHED |
| 804 |
port: 11211 |
| 805 |
vpc_security_group_memberships: |
| 806 |
- "{{ sg_1 }}" |
| 807 |
- "{{ sg_2 }}" |
| 808 |
- "{{ sg_3 }}" |
| 809 |
option_settings: |
| 810 |
- name: CHUNK_SIZE_GROWTH_FACTOR |
| 811 |
value: "1.2" |
| 812 |
register: new_rds_mysql_option_group |
| 813 |
|
| 814 |
- name: Validate return values |
| 815 |
ansible.builtin.assert: |
| 816 |
that: |
| 817 |
- not new_rds_mysql_option_group.changed |
| 818 |
- "'engine_name' in new_rds_mysql_option_group" |
| 819 |
- new_rds_mysql_option_group.engine_name == engine_name |
| 820 |
- "'major_engine_version' in new_rds_mysql_option_group" |
| 821 |
- (new_rds_mysql_option_group.major_engine_version | string) == (major_engine_version | string) |
| 822 |
- "'option_group_arn' in new_rds_mysql_option_group" |
| 823 |
- "'option_group_description' in new_rds_mysql_option_group" |
| 824 |
- new_rds_mysql_option_group.option_group_description == option_group_description |
| 825 |
- "'option_group_name' in new_rds_mysql_option_group" |
| 826 |
- new_rds_mysql_option_group.option_group_name == option_group_name |
| 827 |
- "'vpc_id' in new_rds_mysql_option_group" |
| 828 |
- new_rds_mysql_option_group.vpc_id == vpc_id |
| 829 |
- "'tags' in new_rds_mysql_option_group" |
| 830 |
- new_rds_mysql_option_group.tags == option_tags |
| 831 |
- "'options' in new_rds_mysql_option_group" |
| 832 |
- (new_rds_mysql_option_group.options | length) > 0 |
| 833 |
- "'option_name' in option" |
| 834 |
- option.option_name == "MEMCACHED" |
| 835 |
- "'permanent' in option" |
| 836 |
- "'persistent' in option" |
| 837 |
- "'port' in option" |
| 838 |
- option.port == 11211 |
| 839 |
- "'vpc_security_group_memberships' in option" |
| 840 |
- (option.vpc_security_group_memberships | length) == 3 |
| 841 |
- "'option_settings' in option" |
| 842 |
- (option_settings | length) > 0 |
| 843 |
- option_settings | selectattr('name','equalto','CHUNK_SIZE_GROWTH_FACTOR') | list | count > 0 |
| 844 |
vars: |
| 845 |
option: "{{ new_rds_mysql_option_group.options[0] }}" |
| 846 |
option_settings: "{{ new_rds_mysql_option_group.options[0].option_settings }}" |
| 847 |
option_tags: |
| 848 |
lowercase spaced: hello cruel world |
| 849 |
Title Case: Hello Cruel World |
| 850 |
CamelCase: SimpleCamelCase |
| 851 |
snake_case: simple_snake_case |
| 852 |
|
| 853 |
- name: Delete an RDS Mysql option group - CHECK_MODE |
| 854 |
amazon.aws.rds_option_group: |
| 855 |
state: absent |
| 856 |
option_group_name: "{{ option_group_name }}" |
| 857 |
check_mode: true |
| 858 |
register: deleted_rds_mysql_option_group |
| 859 |
|
| 860 |
- name: Assert success - CHECK_MODE |
| 861 |
ansible.builtin.assert: |
| 862 |
that: |
| 863 |
- deleted_rds_mysql_option_group.changed |
| 864 |
|
| 865 |
- name: Delete an RDS Mysql option group |
| 866 |
amazon.aws.rds_option_group: |
| 867 |
state: absent |
| 868 |
option_group_name: "{{ option_group_name }}" |
| 869 |
register: deleted_rds_mysql_option_group |
| 870 |
|
| 871 |
- name: Assert success |
| 872 |
ansible.builtin.assert: |
| 873 |
that: |
| 874 |
- deleted_rds_mysql_option_group.changed |
| 875 |
|
| 876 |
always: |
| 877 |
- name: Delete an RDS Mysql option group |
| 878 |
amazon.aws.rds_option_group: |
| 879 |
state: absent |
| 880 |
option_group_name: "{{ option_group_name }}" |
| 881 |
register: deleted_rds_mysql_option_group |
| 882 |
ignore_errors: true # noqa: ignore-errors |
| 883 |
|
| 884 |
- name: Remove security groups |
| 885 |
amazon.aws.ec2_security_group: |
| 886 |
name: "{{ item }}" |
| 887 |
description: created by rds_instance integration tests |
| 888 |
state: absent |
| 889 |
register: sgs_result |
| 890 |
loop: |
| 891 |
- "{{ sg_1_name }}" |
| 892 |
- "{{ sg_2_name }}" |
| 893 |
- "{{ sg_3_name }}" |
| 894 |
ignore_errors: true # noqa: ignore-errors |
| 895 |
|
| 896 |
- name: Remove subnet |
| 897 |
amazon.aws.ec2_vpc_subnet: |
| 898 |
cidr: "{{ subnet_cidr }}" |
| 899 |
vpc_id: "{{ vpc_id }}" |
| 900 |
state: absent |
| 901 |
ignore_errors: true # noqa: ignore-errors |
| 902 |
|
| 903 |
- name: Delete VPC |
| 904 |
amazon.aws.ec2_vpc_net: |
| 905 |
name: "{{ vpc_name }}" |
| 906 |
cidr_block: "{{ vpc_cidr }}" |
| 907 |
state: absent |
| 908 |
purge_cidrs: true |
| 909 |
ignore_errors: true # noqa: ignore-errors |