mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 10:54:44 +00:00
Merge pull request #336 from seocam/dnszone-tests-cleanup
Added cleanup to the end of dnszone tests
This commit is contained in:
13
tests/dnszone/env_cleanup.yml
Normal file
13
tests/dnszone/env_cleanup.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure zone is absent.
|
||||||
|
ipadnszone:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
name:
|
||||||
|
- testzone.local
|
||||||
|
- test1.testzone.local
|
||||||
|
- test2.testzone.local
|
||||||
|
- test3.testzone.local
|
||||||
|
- 2.0.192.in-addr.arpa.
|
||||||
|
- 0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa.
|
||||||
|
- 1.0.0.0.e.f.a.c.8.b.d.0.1.0.0.2.ip6.arpa.
|
||||||
|
state: absent
|
||||||
3
tests/dnszone/env_setup.yml
Normal file
3
tests/dnszone/env_setup.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Cleanup test environment.
|
||||||
|
include_tasks: env_cleanup.yml
|
||||||
3
tests/dnszone/env_teardown.yml
Normal file
3
tests/dnszone/env_teardown.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- name: Cleanup test environment.
|
||||||
|
include_tasks: env_cleanup.yml
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
- name: Ensure zone is absent.
|
- name: Setup testing environment
|
||||||
ipadnszone:
|
include_tasks: env_setup.yml
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: testzone.local
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
- name: Ensure zone is present.
|
- name: Ensure zone is present.
|
||||||
@@ -186,3 +183,7 @@
|
|||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
|
# Teardown
|
||||||
|
- name: Teardown testing environment
|
||||||
|
include_tasks: env_teardown.yml
|
||||||
|
|||||||
@@ -7,11 +7,8 @@
|
|||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
- name: Ensure zone is absent.
|
- name: Setup testing environment
|
||||||
ipadnszone:
|
include_tasks: env_setup.yml
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: testzone.local
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
- name: Ensure zone is present.
|
- name: Ensure zone is present.
|
||||||
@@ -317,3 +314,7 @@
|
|||||||
admin_email: admin2@example.com
|
admin_email: admin2@example.com
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
|
# Teardown
|
||||||
|
- name: Teardown testing environment
|
||||||
|
include_tasks: env_teardown.yml
|
||||||
|
|||||||
@@ -7,17 +7,10 @@
|
|||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
- name: Ensure zone is absent.
|
- name: Setup testing environment
|
||||||
ipadnszone:
|
include_tasks: env_setup.yml
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- 2.0.192.in-addr.arpa.
|
|
||||||
- 0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.f.ip6.arpa.
|
|
||||||
- 1.0.0.0.e.f.a.c.8.b.d.0.1.0.0.2.ip6.arpa.
|
|
||||||
|
|
||||||
# tests
|
# Tests
|
||||||
- name: Ensure zone exists for reverse IP.
|
- name: Ensure zone exists for reverse IP.
|
||||||
ipadnszone:
|
ipadnszone:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -100,13 +93,6 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
# Cleanup
|
# Teardown
|
||||||
- name: Ensure zone is absent.
|
- name: Teardown testing environment
|
||||||
ipadnszone:
|
include_tasks: env_teardown.yml
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- "{{ ipv6_zone.dnszone.name }}"
|
|
||||||
- "{{ ipv6_sec_zone.dnszone.name }}"
|
|
||||||
- "{{ ipv4_zone.dnszone.name }}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user