Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible FreeIPA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Ansible FreeIPA
Commits
804e633f
Commit
804e633f
authored
3 years ago
by
Thomas Woerner
Browse files
Options
Downloads
Patches
Plain Diff
test_servicedelegationtarget.yml: Added list tests
List tests, also an empty list test has been added.
parent
ad37bed3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/servicedelegationtarget/test_servicedelegationtarget.yml
+175
-14
175 additions, 14 deletions
.../servicedelegationtarget/test_servicedelegationtarget.yml
with
175 additions
and
14 deletions
tests/servicedelegationtarget/test_servicedelegationtarget.yml
+
175
−
14
View file @
804e633f
...
@@ -17,21 +17,40 @@
...
@@ -17,21 +17,40 @@
name
:
test-delegation-target
name
:
test-delegation-target
state
:
absent
state
:
absent
-
name
:
Ensure service
is
absent
-
name
:
Ensure
test
service
s are
absent
ipaservice
:
ipaservice
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
name
:
-
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
state
:
absent
state
:
absent
continue
:
yes
continue
:
yes
# CREATE TEST ITEMS
# CREATE TEST ITEMS
-
name
:
Ensure service test-sevice is present
-
name
:
Ensure service test-sevice
1
is present
ipaservice
:
ipaservice
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
name
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure service test-sevice2 is present
ipaservice
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure service test-sevice3 is present
ipaservice
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
register
:
result
register
:
result
failed_when
:
not result.changed or result.failed
failed_when
:
not result.changed or result.failed
...
@@ -53,43 +72,182 @@
...
@@ -53,43 +72,182 @@
register
:
result
register
:
result
failed_when
:
result.changed or result.failed
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service/' + ansible_facts['fqdn'] }}" is present
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is present
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
action
:
member
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is present again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
action
:
member
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service2/' + ansible_facts['fqdn'] }}" is present
ipaservicedelegationtarget
:
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
name
:
test-delegation-target
principal
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
principal
:
"
{{
'test-service
2
/'
+
ansible_facts['fqdn']
}}"
action
:
member
action
:
member
register
:
result
register
:
result
failed_when
:
not result.changed or result.failed
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service/' + ansible_facts['fqdn'] }}" is present again
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service2/' + ansible_facts['fqdn'] }}" is present again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
action
:
member
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target principal is empty
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
[]
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target principal is empty, again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
[]
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is absent
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
action
:
member
state
:
absent
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is absent
ipaservicedelegationtarget
:
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
name
:
test-delegation-target
principal
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
principal
:
"
{{
'test-service
1
/'
+
ansible_facts['fqdn']
}}"
action
:
member
action
:
member
state
:
absent
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service3/' + ansible_facts['fqdn'] }}" is present
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
action
:
member
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service3/' + ansible_facts['fqdn'] }}" is present again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
action
:
member
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target principal
"{{ 'test-service1/' + ansible_facts['fqdn'] }}" and
"{{ 'test-service2/' + ansible_facts['fqdn'] }}" are set
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
-
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target principal
"{{ 'test-service1/' + ansible_facts['fqdn'] }}" and
"{{ 'test-service2/' + ansible_facts['fqdn'] }}" are set, again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
-
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Fail if servicedelegationtarget test-delegation-target member principal "{{ 'test-service3/' + ansible_facts['fqdn'] }}" can be removed
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
action
:
member
state
:
absent
register
:
result
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is absent
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
action
:
member
state
:
absent
register
:
result
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service1/' + ansible_facts['fqdn'] }}" is absent, again
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
principal
:
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
action
:
member
state
:
absent
register
:
result
register
:
result
failed_when
:
result.changed or result.failed
failed_when
:
result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service/' + ansible_facts['fqdn'] }}" is absent
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service
2
/' + ansible_facts['fqdn'] }}" is absent
ipaservicedelegationtarget
:
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
name
:
test-delegation-target
principal
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
principal
:
"
{{
'test-service
2
/'
+
ansible_facts['fqdn']
}}"
action
:
member
action
:
member
state
:
absent
state
:
absent
register
:
result
register
:
result
failed_when
:
not result.changed or result.failed
failed_when
:
not result.changed or result.failed
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service/' + ansible_facts['fqdn'] }}" is
pre
sent a
bsent
-
name
:
Ensure servicedelegationtarget test-delegation-target member principal "{{ 'test-service
2
/' + ansible_facts['fqdn'] }}" is
ab
sent
,
a
gain
ipaservicedelegationtarget
:
ipaservicedelegationtarget
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
test-delegation-target
name
:
test-delegation-target
principal
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
principal
:
"
{{
'test-service
2
/'
+
ansible_facts['fqdn']
}}"
action
:
member
action
:
member
state
:
absent
state
:
absent
register
:
result
register
:
result
...
@@ -115,10 +273,13 @@
...
@@ -115,10 +273,13 @@
# CLEANUP TEST ITEMS
# CLEANUP TEST ITEMS
-
name
:
Ensure service
is
absent
-
name
:
Ensure
test
service
s are
absent
ipaservice
:
ipaservice
:
ipaadmin_password
:
SomeADMINpassword
ipaadmin_password
:
SomeADMINpassword
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
ipaapi_context
:
"
{{
ipa_context
|
default(omit)
}}"
name
:
"
{{
'test-service/'
+
ansible_facts['fqdn']
}}"
name
:
-
"
{{
'test-service1/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service2/'
+
ansible_facts['fqdn']
}}"
-
"
{{
'test-service3/'
+
ansible_facts['fqdn']
}}"
state
:
absent
state
:
absent
continue
:
yes
continue
:
yes
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment