mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 22:03:18 +00:00
Merge pull request #349 from t-woerner/new_location_module
New location management module
This commit is contained in:
64
tests/location/test_location.yml
Normal file
64
tests/location/test_location.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
- name: Test location
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
|
||||
# CLEANUP TEST ITEMS
|
||||
|
||||
- name: Ensure location my_location1 is absent
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
state: absent
|
||||
|
||||
# CREATE TEST ITEMS
|
||||
|
||||
# TESTS
|
||||
|
||||
- name: Ensure location my_location1 is present
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
register: result
|
||||
failed_when: not result.changed or result.failed
|
||||
|
||||
- name: Ensure location my_location1 is present again
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
- name: Ensure location my_location1 is present with description
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
description: My Location 1
|
||||
register: result
|
||||
failed_when: not result.changed or result.failed
|
||||
|
||||
- name: Ensure location my_location1 is present again with description
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
description: My Location 1
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
- name: Ensure location my_location1 is absent
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: not result.changed or result.failed
|
||||
|
||||
- name: Ensure location my_location1 is absent again
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
# CLEANUP TEST ITEMS
|
||||
|
||||
- name: Ensure location my_location1 is absent
|
||||
ipalocation:
|
||||
name: my_location1
|
||||
state: absent
|
||||
Reference in New Issue
Block a user