templates: Allow execution of plugins in an IPA client host.

Modify templates to create the basic tests for `ipaapi_context: client`.
This commit is contained in:
Rafael Guterres Jeffman
2021-09-08 17:06:37 -03:00
parent 8bc6b01f49
commit 1c679c5a9a
4 changed files with 61 additions and 2 deletions

View File

@@ -1,7 +1,10 @@
---
- name: Test $name
hosts: ipaserver
hosts: "{{ ipa_test_host | default('ipaserver') }}"
# Change "become" or "gather_facts" to "yes",
# if you test playbook requires any.
become: no
gather_facts: no
tasks:
@@ -20,6 +23,7 @@
- name: Ensure $name NAME is present
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
# Add needed parameters here
register: result
@@ -28,6 +32,7 @@
- name: Ensure $name NAME is present again
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
# Add needed parameters here
register: result
@@ -36,6 +41,7 @@
- name: Ensure $name NAME member PARAMETER2 VALUE is present
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
PARAMETER2: VALUE
action: member
@@ -45,6 +51,7 @@
- name: Ensure $name NAME member PARAMETER2 VALUE is present again
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
PARAMETER2: VALUE
action: member
@@ -54,6 +61,7 @@
- name: Ensure $name NAME member PARAMETER2 VALUE is absent
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
PARAMETER2: VALUE
action: member
@@ -64,6 +72,7 @@
- name: Ensure $name NAME member PARAMETER2 VALUE is absent again
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
PARAMETER2: VALUE
action: member
@@ -76,6 +85,7 @@
- name: Ensure $name NAME is absent
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
state: absent
register: result
@@ -84,6 +94,7 @@
- name: Ensure $name NAME is absent again
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
state: absent
register: result
@@ -94,5 +105,6 @@
- name: Ensure $name NAME is absent
ipa$name:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: NAME
state: absent