mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +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:
|
||||
|
||||
# Setup
|
||||
- name: Ensure zone is absent.
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: testzone.local
|
||||
state: absent
|
||||
- name: Setup testing environment
|
||||
include_tasks: env_setup.yml
|
||||
|
||||
# Tests
|
||||
- name: Ensure zone is present.
|
||||
@@ -186,3 +183,7 @@
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
# Teardown
|
||||
- name: Teardown testing environment
|
||||
include_tasks: env_teardown.yml
|
||||
|
||||
@@ -7,11 +7,8 @@
|
||||
tasks:
|
||||
|
||||
# Setup
|
||||
- name: Ensure zone is absent.
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: testzone.local
|
||||
state: absent
|
||||
- name: Setup testing environment
|
||||
include_tasks: env_setup.yml
|
||||
|
||||
# Tests
|
||||
- name: Ensure zone is present.
|
||||
@@ -317,3 +314,7 @@
|
||||
admin_email: admin2@example.com
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
# Teardown
|
||||
- name: Teardown testing environment
|
||||
include_tasks: env_teardown.yml
|
||||
|
||||
@@ -7,17 +7,10 @@
|
||||
tasks:
|
||||
|
||||
# Setup
|
||||
- name: Ensure zone is absent.
|
||||
ipadnszone:
|
||||
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.
|
||||
- name: Setup testing environment
|
||||
include_tasks: env_setup.yml
|
||||
|
||||
# tests
|
||||
# Tests
|
||||
- name: Ensure zone exists for reverse IP.
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
@@ -100,13 +93,6 @@
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
# Cleanup
|
||||
- name: Ensure zone is absent.
|
||||
ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "{{ ipv6_zone.dnszone.name }}"
|
||||
- "{{ ipv6_sec_zone.dnszone.name }}"
|
||||
- "{{ ipv4_zone.dnszone.name }}"
|
||||
# Teardown
|
||||
- name: Teardown testing environment
|
||||
include_tasks: env_teardown.yml
|
||||
|
||||
Reference in New Issue
Block a user