mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-11-25 10:23:49 +00:00
Added ability to add pytest tests
Until now ansible-freeipa repository only had playbook tests. This commit introduces the ability of creating TestCase classes connected to the master host. This connection can be used to run commands in the managed host after the ansible playbook execution is the allowing the verification of the machine state.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Playbook to ensure the DNS zones is present with multiple forwarder ipv4, ipv6, and port.
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 04testzone.test
|
||||
forwarders:
|
||||
- ip_address: 192.11.22.33
|
||||
- ip_address: 192.11.22.34
|
||||
port: 23
|
||||
- ip_address: 2001:db8:cafe:1::1
|
||||
- ip_address: 2001:db8:cafe:1::4
|
||||
port: 34
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Playbook to ensure the DNS zones is present without forwarder as well.
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 01testzone.test
|
||||
forwarders: []
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Playbook to ensure remove multiple dnszone.
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: delzone1.com,delzone2.com,delzone3.com
|
||||
state: absent
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Playbook to ensure the DNS zones disabled.
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
state: disabled
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Playbook to ensure the DNS zones enabled.
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
state: enabled
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: Playbook to with invalid IP’s in allow_transfer.
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: invalidzone.test
|
||||
forwarders:
|
||||
- ip_address: in.va.li.d
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Playbook to ensure, not able to add invalid(more than 4294967295) serial numbers.
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: invalidserialzone.test
|
||||
serial: 429496729599
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Playbook to ensure reverse zone is added by the IP..
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name_from_ip: 192.8.2.0/22
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Playbook to ensure the DNS zones is present with forward_policy only.
|
||||
hosts: ipaserver
|
||||
|
||||
tasks:
|
||||
- ipadnszone:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: 26testzone.test
|
||||
forward_policy: only
|
||||
Reference in New Issue
Block a user