2018-03-16 18:28:19 +01:00
|
|
|
- name: Create an Inventory
|
|
|
|
tower_inventory:
|
|
|
|
name: my-inventory
|
|
|
|
organization: Default
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
|
|
|
|
|
|
|
- name: Delete an Inventory
|
|
|
|
tower_inventory:
|
|
|
|
name: my-inventory
|
|
|
|
organization: Default
|
|
|
|
state: absent
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result is changed"
|
2019-01-09 15:31:21 +01:00
|
|
|
|
|
|
|
- name: Check module fails with correct msg
|
|
|
|
tower_inventory:
|
|
|
|
name: test-inventory
|
|
|
|
description: Inventory Description
|
|
|
|
organization: test-non-existing-org
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
ignore_errors: true
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.msg =='Failed to update inventory, organization not found: The requested object could not be found.'"
|