mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
Tests for module ipalocation failed due to missing ipaadmin_password. Added the variable to the playbooks, and also fixed the examples and documentation. Some playbooks had identation fixed to two spaces instead of one for consistency with other modules.
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
---
|
|
- name: Test location
|
|
hosts: ipaserver
|
|
become: true
|
|
|
|
tasks:
|
|
|
|
# CLEANUP TEST ITEMS
|
|
|
|
- name: Ensure location my_location1 is absent
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
state: absent
|
|
|
|
# CREATE TEST ITEMS
|
|
|
|
# TESTS
|
|
|
|
- name: Ensure location my_location1 is present
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Ensure location my_location1 is present again
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
register: result
|
|
failed_when: result.changed or result.failed
|
|
|
|
- name: Ensure location my_location1 is present with description
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
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:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
description: My Location 1
|
|
register: result
|
|
failed_when: result.changed or result.failed
|
|
|
|
- name: Ensure location my_location1 is absent
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
state: absent
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Ensure location my_location1 is absent again
|
|
ipalocation:
|
|
ipaadmin_password: SomeADMINpassword
|
|
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:
|
|
ipaadmin_password: SomeADMINpassword
|
|
name: my_location1
|
|
state: absent
|