|
1648 | 1648 | - test_two['manufacturer']['slug'] == "test-manufacturer-two"
|
1649 | 1649 | - test_two['msg'] == "manufacturer Test Manufacturer Two already exists"
|
1650 | 1650 |
|
1651 |
| - - name: "MANUFACTURER 3: ASSERT - Delete" |
| 1651 | + - name: "MANUFACTURER 3: Update" |
1652 | 1652 | netbox_manufacturer:
|
1653 | 1653 | netbox_url: http://localhost:32768
|
1654 | 1654 | netbox_token: 0123456789abcdef0123456789abcdef01234567
|
1655 | 1655 | data:
|
1656 |
| - name: Test Manufacturer Two |
1657 |
| - state: absent |
| 1656 | + name: test manufacturer two |
| 1657 | + state: present |
1658 | 1658 | register: test_three
|
1659 | 1659 |
|
| 1660 | + - name: "MANUFACTURER 3: ASSERT - Update" |
| 1661 | + assert: |
| 1662 | + that: |
| 1663 | + - test_three['changed'] |
| 1664 | + - test_three['manufacturer']['name'] == "test manufacturer two" |
| 1665 | + - test_three['manufacturer']['slug'] == "test-manufacturer-two" |
| 1666 | + - test_three['msg'] == "manufacturer test manufacturer two updated" |
| 1667 | + |
| 1668 | + - name: "MANUFACTURER 4: ASSERT - Delete" |
| 1669 | + netbox_manufacturer: |
| 1670 | + netbox_url: http://localhost:32768 |
| 1671 | + netbox_token: 0123456789abcdef0123456789abcdef01234567 |
| 1672 | + data: |
| 1673 | + name: test manufacturer two |
| 1674 | + state: absent |
| 1675 | + register: test_four |
| 1676 | + |
1660 | 1677 | - name: "MANUFACTURER 3: ASSERT - Delete"
|
1661 | 1678 | assert:
|
1662 | 1679 | that:
|
1663 |
| - - test_three is changed |
1664 |
| - - test_three['diff']['before']['state'] == "present" |
1665 |
| - - test_three['diff']['after']['state'] == "absent" |
1666 |
| - - test_three['msg'] == "manufacturer Test Manufacturer Two deleted" |
| 1680 | + - test_four is changed |
| 1681 | + - test_four['diff']['before']['state'] == "present" |
| 1682 | + - test_four['diff']['after']['state'] == "absent" |
| 1683 | + - test_four['msg'] == "manufacturer test manufacturer two deleted" |
1667 | 1684 |
|
1668 |
| - - name: "MANUFACTURER 4: ASSERT - Delete non existing" |
| 1685 | + - name: "MANUFACTURER 5: ASSERT - Delete non existing" |
1669 | 1686 | netbox_manufacturer:
|
1670 | 1687 | netbox_url: http://localhost:32768
|
1671 | 1688 | netbox_token: 0123456789abcdef0123456789abcdef01234567
|
1672 | 1689 | data:
|
1673 | 1690 | name: Test Manufacturer Two
|
1674 | 1691 | state: absent
|
1675 |
| - register: test_four |
| 1692 | + register: test_five |
1676 | 1693 |
|
1677 |
| - - name: "MANUFACTURER 4: ASSERT - Delete non existing" |
| 1694 | + - name: "MANUFACTURER 5: ASSERT - Delete non existing" |
1678 | 1695 | assert:
|
1679 | 1696 | that:
|
1680 |
| - - not test_four['changed'] |
1681 |
| - - test_four['manufacturer'] == None |
1682 |
| - - test_four['msg'] == "manufacturer Test Manufacturer Two already absent" |
| 1697 | + - not test_five['changed'] |
| 1698 | + - test_five['manufacturer'] == None |
| 1699 | + - test_five['msg'] == "manufacturer Test Manufacturer Two already absent" |
1683 | 1700 |
|
1684 | 1701 | ##
|
1685 | 1702 | ##
|
|
0 commit comments