|
306 | 306 | - test_fourteen['ip_address']['family'] == 4
|
307 | 307 | - test_fourteen['ip_address']['interface'] == 5
|
308 | 308 |
|
309 |
| -- name: "15 - Create IP address with no mask - State: Present" |
| 309 | +- name: "15 - Create same IP address on Eth0 - test101-vm - State: present" |
310 | 310 | netbox.netbox.netbox_ip_address:
|
311 | 311 | netbox_url: http://localhost.org:32768
|
312 | 312 | netbox_token: 0123456789abcdef0123456789abcdef01234567
|
313 | 313 | data:
|
314 |
| - address: 10.120.10.1 |
315 |
| - state: present |
| 314 | + family: 4 |
| 315 | + address: 10.188.1.100/24 |
| 316 | + interface: |
| 317 | + name: Eth0 |
| 318 | + virtual_machine: test101-vm |
| 319 | + state: "present" |
316 | 320 | register: test_fifteen
|
317 | 321 |
|
318 | 322 | - name: "15 - ASSERT"
|
|
321 | 325 | - test_fifteen is changed
|
322 | 326 | - test_fifteen['diff']['before']['state'] == "absent"
|
323 | 327 | - test_fifteen['diff']['after']['state'] == "present"
|
324 |
| - - test_fifteen['msg'] == "ip_address 10.120.10.1/32 created" |
325 |
| - - test_fifteen['ip_address']['address'] == "10.120.10.1/32" |
| 328 | + - test_fifteen['msg'] == "ip_address 10.188.1.100/24 created" |
| 329 | + - test_fifteen['ip_address']['address'] == "10.188.1.100/24" |
| 330 | + - test_fifteen['ip_address']['family'] == 4 |
| 331 | + - test_fifteen['ip_address']['interface'] == 10 |
| 332 | + |
| 333 | +- name: "16 - Create IP address with no mask - State: Present" |
| 334 | + netbox.netbox.netbox_ip_address: |
| 335 | + netbox_url: http://localhost.org:32768 |
| 336 | + netbox_token: 0123456789abcdef0123456789abcdef01234567 |
| 337 | + data: |
| 338 | + address: 10.120.10.1 |
| 339 | + state: present |
| 340 | + register: test_sixteen |
| 341 | + |
| 342 | +- name: "16 - ASSERT" |
| 343 | + assert: |
| 344 | + that: |
| 345 | + - test_sixteen is changed |
| 346 | + - test_sixteen['diff']['before']['state'] == "absent" |
| 347 | + - test_sixteen['diff']['after']['state'] == "present" |
| 348 | + - test_sixteen['msg'] == "ip_address 10.120.10.1/32 created" |
| 349 | + - test_sixteen['ip_address']['address'] == "10.120.10.1/32" |
0 commit comments