mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-05 22:34:40 +00:00
Merge pull request #364 from rjeffman/fix_tests_after_build_matrix
Fix tests that require specific IPA versions.
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- include_tasks: ../env_freeipa_facts.yml
|
||||||
|
|
||||||
# Retrieve current configuration.
|
# Retrieve current configuration.
|
||||||
- name: return current values of the global configuration options
|
- name: return current values of the global configuration options
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
@@ -45,15 +47,17 @@
|
|||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
pac_type: ""
|
pac_type: ""
|
||||||
|
|
||||||
- name: set maxusername to 255
|
|
||||||
ipaconfig:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
maxusername: 255
|
|
||||||
|
|
||||||
- name: set maxhostname to 255
|
- name: set maxhostname to 255
|
||||||
|
block:
|
||||||
|
- ipaconfig:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
maxhostname: 255
|
||||||
|
when: ipa_version is version('4.8.0', '>=')
|
||||||
|
|
||||||
|
- name: set maxusername to 45
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
maxhostname: 255
|
maxusername: 45
|
||||||
|
|
||||||
- name: set pwdexpnotify to 0
|
- name: set pwdexpnotify to 0
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
@@ -186,18 +190,19 @@
|
|||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: set maxhostname to 77
|
- name: set maxhostname to 77
|
||||||
ipaconfig:
|
block:
|
||||||
ipaadmin_password: SomeADMINpassword
|
- ipaconfig:
|
||||||
maxhostname: 77
|
ipaadmin_password: SomeADMINpassword
|
||||||
register: result
|
maxhostname: 77
|
||||||
failed_when: not result.changed
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: set maxhostname to 77, again
|
- ipaconfig:
|
||||||
ipaconfig:
|
ipaadmin_password: SomeADMINpassword
|
||||||
ipaadmin_password: SomeADMINpassword
|
maxhostname: 77
|
||||||
maxhostname: 77
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: result.changed
|
when: ipa_version is version('4.8.0', '>=')
|
||||||
|
|
||||||
- name: set pwdexpnotify to 17
|
- name: set pwdexpnotify to 17
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
@@ -329,7 +334,6 @@
|
|||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: 'SomeADMINpassword'
|
ipaadmin_password: 'SomeADMINpassword'
|
||||||
maxusername: '{{previousconfig.config.maxusername | default(omit)}}'
|
maxusername: '{{previousconfig.config.maxusername | default(omit)}}'
|
||||||
maxhostname: '{{previousconfig.config.maxhostname | default(omit)}}'
|
|
||||||
homedirectory: '{{previousconfig.config.homedirectory | default(omit)}}'
|
homedirectory: '{{previousconfig.config.homedirectory | default(omit)}}'
|
||||||
defaultshell: '{{previousconfig.config.defaultshell | default(omit)}}'
|
defaultshell: '{{previousconfig.config.defaultshell | default(omit)}}'
|
||||||
defaultgroup: '{{previousconfig.config.defaultgroup | default(omit)}}'
|
defaultgroup: '{{previousconfig.config.defaultgroup | default(omit)}}'
|
||||||
@@ -352,11 +356,17 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
|
- name: reset maxhostname
|
||||||
|
block:
|
||||||
|
- ipaconfig:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
maxhostname: '{{previousconfig.config.maxhostname | default(omit)}}'
|
||||||
|
when: ipa_version is version('4.8.0', '>=')
|
||||||
|
|
||||||
- name: reset changed fields, again
|
- name: reset changed fields, again
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: 'SomeADMINpassword'
|
ipaadmin_password: 'SomeADMINpassword'
|
||||||
maxusername: '{{previousconfig.config.maxusername | default(omit)}}'
|
maxusername: '{{previousconfig.config.maxusername | default(omit)}}'
|
||||||
maxhostname: '{{previousconfig.config.maxhostname | default(omit)}}'
|
|
||||||
homedirectory: '{{previousconfig.config.homedirectory | default(omit)}}'
|
homedirectory: '{{previousconfig.config.homedirectory | default(omit)}}'
|
||||||
defaultshell: '{{previousconfig.config.defaultshell | default(omit)}}'
|
defaultshell: '{{previousconfig.config.defaultshell | default(omit)}}'
|
||||||
defaultgroup: '{{previousconfig.config.defaultgroup | default(omit)}}'
|
defaultgroup: '{{previousconfig.config.defaultgroup | default(omit)}}'
|
||||||
@@ -379,6 +389,13 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
|
- name: reset maxhostname
|
||||||
|
block:
|
||||||
|
- ipaconfig:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
maxhostname: '{{previousconfig.config.maxhostname | default(omit)}}'
|
||||||
|
when: ipa_version is version('4.8.0', '>=')
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
|
|
||||||
- name: cleanup test group
|
- name: cleanup test group
|
||||||
|
|||||||
@@ -5,199 +5,205 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure user manangeruser1 and manageruser2 is absent
|
- include_tasks: ../env_freeipa_facts.yml
|
||||||
ipauser:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: manageruser1,manageruser2,unknown_user
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure group testgroup, managergroup1 and managergroup2 are absent
|
- name: Tests requiring IPA version 4.8.4+
|
||||||
ipagroup:
|
block:
|
||||||
ipaadmin_password: SomeADMINpassword
|
- name: Ensure user manangeruser1 and manageruser2 is absent
|
||||||
name: testgroup,managergroup1,managergroup2
|
ipauser:
|
||||||
state: absent
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
name: manageruser1,manageruser2,unknown_user
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Ensure user manageruser1 and manageruser2 are present
|
- name: Ensure group testgroup, managergroup1 and managergroup2 are absent
|
||||||
ipauser:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
users:
|
name: testgroup,managergroup1,managergroup2
|
||||||
- name: manageruser1
|
state: absent
|
||||||
first: manageruser1
|
|
||||||
last: Last1
|
|
||||||
- name: manageruser2
|
|
||||||
first: manageruser2
|
|
||||||
last: Last2
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure testgroup is present
|
- name: Ensure user manageruser1 and manageruser2 are present
|
||||||
ipagroup:
|
ipauser:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
users:
|
||||||
register: result
|
- name: manageruser1
|
||||||
failed_when: not result.changed
|
first: manageruser1
|
||||||
|
last: Last1
|
||||||
|
- name: manageruser2
|
||||||
|
first: manageruser2
|
||||||
|
last: Last2
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure managergroup1 is present
|
- name: Ensure testgroup is present
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: managergroup1
|
name: testgroup
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure managergroup2 is present
|
- name: Ensure managergroup1 is present
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: managergroup2
|
name: managergroup1
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user1 is present for testgroup
|
- name: Ensure managergroup2 is present
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: managergroup2
|
||||||
membermanager_user: manageruser1
|
register: result
|
||||||
register: result
|
failed_when: not result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure membermanager user1 is present for testgroup again
|
- name: Ensure membermanager user1 is present for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1
|
membermanager_user: manageruser1
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager group1 is present for testgroup
|
- name: Ensure membermanager user1 is present for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_group: managergroup1
|
membermanager_user: manageruser1
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager group1 is present for testgroup again
|
- name: Ensure membermanager group1 is present for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_group: managergroup1
|
membermanager_group: managergroup1
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user2 and group2 members are present for testgroup
|
- name: Ensure membermanager group1 is present for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser2
|
membermanager_group: managergroup1
|
||||||
membermanager_group: managergroup2
|
register: result
|
||||||
action: member
|
failed_when: result.changed
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure membermanager user2 and group2 members are present for testgroup again
|
- name: Ensure membermanager user2 and group2 members are present for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser2
|
membermanager_user: manageruser2
|
||||||
membermanager_group: managergroup2
|
membermanager_group: managergroup2
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user and group members are present for testgroup again
|
- name: Ensure membermanager user2 and group2 members are present for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1,manageruser2
|
membermanager_user: manageruser2
|
||||||
membermanager_group: managergroup1,managergroup2
|
membermanager_group: managergroup2
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user1 and group1 members are absent for testgroup
|
- name: Ensure membermanager user and group members are present for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1
|
membermanager_user: manageruser1,manageruser2
|
||||||
membermanager_group: managergroup1
|
membermanager_group: managergroup1,managergroup2
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure membermanager user1 and group1 members are absent for testgroup again
|
- name: Ensure membermanager user1 and group1 members are absent for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1
|
membermanager_user: manageruser1
|
||||||
membermanager_group: managergroup1
|
membermanager_group: managergroup1
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user1 and group1 members are present for testgroup
|
- name: Ensure membermanager user1 and group1 members are absent for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1
|
membermanager_user: manageruser1
|
||||||
membermanager_group: managergroup1
|
membermanager_group: managergroup1
|
||||||
action: member
|
action: member
|
||||||
register: result
|
state: absent
|
||||||
failed_when: not result.changed
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user1 and group1 members are present for testgroup again
|
- name: Ensure membermanager user1 and group1 members are present for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1
|
membermanager_user: manageruser1
|
||||||
membermanager_group: managergroup1
|
membermanager_group: managergroup1
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure membermanager user and group members are absent for testgroup
|
- name: Ensure membermanager user1 and group1 members are present for testgroup again
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1,manageruser2
|
membermanager_user: manageruser1
|
||||||
membermanager_group: managergroup1,managergroup2
|
membermanager_group: managergroup1
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure membermanager user and group members are absent for testgroup again
|
- name: Ensure membermanager user and group members are absent for testgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: testgroup
|
||||||
membermanager_user: manageruser1,manageruser2
|
membermanager_user: manageruser1,manageruser2
|
||||||
membermanager_group: managergroup1,managergroup2
|
membermanager_group: managergroup1,managergroup2
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure user manangeruser1 and manageruser2 is absent
|
- name: Ensure membermanager user and group members are absent for testgroup again
|
||||||
ipauser:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: manageruser1,manageruser2
|
name: testgroup
|
||||||
state: absent
|
membermanager_user: manageruser1,manageruser2
|
||||||
register: result
|
membermanager_group: managergroup1,managergroup2
|
||||||
failed_when: not result.changed
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure unknown membermanager_user member failure
|
- name: Ensure user manangeruser1 and manageruser2 is absent
|
||||||
ipagroup:
|
ipauser:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup
|
name: manageruser1,manageruser2
|
||||||
membermanager_user: unknown_user
|
state: absent
|
||||||
action: member
|
register: result
|
||||||
register: result
|
failed_when: not result.changed
|
||||||
failed_when: result.changed or "no such entry" not in result.msg
|
|
||||||
|
|
||||||
- name: Ensure group testgroup, managergroup1 and managergroup2 are absent
|
- name: Ensure unknown membermanager_user member failure
|
||||||
ipagroup:
|
ipagroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: testgroup,managergroup1,managergroup2
|
name: testgroup
|
||||||
state: absent
|
membermanager_user: unknown_user
|
||||||
register: result
|
action: member
|
||||||
failed_when: not result.changed
|
register: result
|
||||||
|
failed_when: result.changed or "no such entry" not in result.msg
|
||||||
|
|
||||||
|
- name: Ensure group testgroup, managergroup1 and managergroup2 are absent
|
||||||
|
ipagroup:
|
||||||
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
name: testgroup,managergroup1,managergroup2
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
|
when: ipa_version is version('4.8.4', '>=')
|
||||||
|
|||||||
@@ -17,480 +17,485 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# setup
|
||||||
- name: Setup test environment
|
- include_tasks: ../env_freeipa_facts.yml
|
||||||
include_tasks: env_setup.yml
|
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
- name: Ensure service is present
|
- name: Tests with skip_host_check, require IPA version 4.8.0+.
|
||||||
ipaservice:
|
block:
|
||||||
ipaadmin_password: SomeADMINpassword
|
- name: Setup test environment
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
include_tasks: env_setup.yml
|
||||||
pac_type:
|
|
||||||
- MS-PAC
|
|
||||||
- PAD
|
|
||||||
auth_ind: otp
|
|
||||||
skip_host_check: no
|
|
||||||
force: yes
|
|
||||||
requires_pre_auth: yes
|
|
||||||
ok_as_delegate: no
|
|
||||||
ok_to_auth_as_delegate: no
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure service is present, again
|
- name: Ensure service is present
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type:
|
pac_type:
|
||||||
- MS_PAC
|
- MS-PAC
|
||||||
- PAD
|
- PAD
|
||||||
auth_ind: otp
|
auth_ind: otp
|
||||||
skip_host_check: no
|
skip_host_check: no
|
||||||
force: no
|
force: yes
|
||||||
requires_pre_auth: yes
|
requires_pre_auth: yes
|
||||||
ok_as_delegate: no
|
ok_as_delegate: no
|
||||||
ok_to_auth_as_delegate: no
|
ok_to_auth_as_delegate: no
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Modify service.
|
- name: Ensure service is present, again
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type: NONE
|
pac_type:
|
||||||
ok_as_delegate: yes
|
- MS_PAC
|
||||||
ok_to_auth_as_delegate: yes
|
- PAD
|
||||||
register: result
|
auth_ind: otp
|
||||||
failed_when: not result.changed
|
skip_host_check: no
|
||||||
|
force: no
|
||||||
|
requires_pre_auth: yes
|
||||||
|
ok_as_delegate: no
|
||||||
|
ok_to_auth_as_delegate: no
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Modify service, again.
|
- name: Modify service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type: NONE
|
pac_type: NONE
|
||||||
ok_as_delegate: yes
|
ok_as_delegate: yes
|
||||||
ok_to_auth_as_delegate: yes
|
ok_to_auth_as_delegate: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, without host object.
|
- name: Modify service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ nohost_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
skip_host_check: yes
|
pac_type: NONE
|
||||||
register: result
|
ok_as_delegate: yes
|
||||||
failed_when: not result.changed
|
ok_to_auth_as_delegate: yes
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, without host object, again.
|
- name: Ensure service is present, without host object.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ nohost_fqdn }}"
|
name: "HTTP/{{ nohost_fqdn }}"
|
||||||
skip_host_check: yes
|
skip_host_check: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, with host not in DNS.
|
- name: Ensure service is present, without host object, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/svc.ihavenodns.info
|
name: "HTTP/{{ nohost_fqdn }}"
|
||||||
skip_host_check: no
|
skip_host_check: yes
|
||||||
force: yes
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure service is present, with host not in DNS, again.
|
- name: Ensure service is present, with host not in DNS.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/svc.ihavenodns.info
|
name: HTTP/svc.ihavenodns.info
|
||||||
skip_host_check: no
|
skip_host_check: no
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, whithout host object and with host not in DNS.
|
- name: Ensure service is present, with host not in DNS, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/no.idontexist.info
|
name: HTTP/svc.ihavenodns.info
|
||||||
skip_host_check: yes
|
skip_host_check: no
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, whithout host object and with host not in DNS, again.
|
- name: Ensure service is present, whithout host object and with host not in DNS.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/no.idontexist.info
|
name: HTTP/no.idontexist.info
|
||||||
skip_host_check: yes
|
skip_host_check: yes
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Principal host/test.example.com present in service.
|
- name: Ensure service is present, whithout host object and with host not in DNS, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: HTTP/no.idontexist.info
|
||||||
principal:
|
skip_host_check: yes
|
||||||
- host/test.example.com
|
force: yes
|
||||||
action: member
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Principal host/test.example.com present in service, again.
|
- name: Principal host/test.example.com present in service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
principal:
|
||||||
- host/test.example.com
|
- host/test.example.com
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Principal host/test.example.com absent in service.
|
- name: Principal host/test.example.com present in service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
principal:
|
||||||
- host/test.example.com
|
- host/test.example.com
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Principal host/test.example.com absent in service, again.
|
- name: Principal host/test.example.com absent in service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
principal:
|
||||||
- host/test.example.com
|
- host/test.example.com
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure host can manage service.
|
- name: Principal host/test.example.com absent in service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host:
|
principal:
|
||||||
- "{{ host1_fqdn }}"
|
- host/test.example.com
|
||||||
- "{{ host2_fqdn }}"
|
action: member
|
||||||
action: member
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure host can manage service, again.
|
- name: Ensure host can manage service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host: "{{ host1_fqdn }}"
|
host:
|
||||||
action: member
|
- "{{ host1_fqdn }}"
|
||||||
register: result
|
- "{{ host2_fqdn }}"
|
||||||
failed_when: result.changed
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure host cannot manage service.
|
- name: Ensure host can manage service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host:
|
host: "{{ host1_fqdn }}"
|
||||||
- "{{ host1_fqdn }}"
|
action: member
|
||||||
- "{{ host2_fqdn }}"
|
register: result
|
||||||
action: member
|
failed_when: result.changed
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure host cannot manage service, again.
|
- name: Ensure host cannot manage service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host:
|
host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups.
|
- name: Ensure host cannot manage service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_create_keytab_user:
|
host:
|
||||||
- user01
|
- "{{ host1_fqdn }}"
|
||||||
- user02
|
- "{{ host2_fqdn }}"
|
||||||
allow_create_keytab_group:
|
action: member
|
||||||
- group01
|
state: absent
|
||||||
- group02
|
register: result
|
||||||
allow_create_keytab_host:
|
failed_when: result.changed
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_create_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_create_keytab_user:
|
allow_create_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_create_keytab_group:
|
allow_create_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_create_keytab_host:
|
allow_create_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_create_keytab_hostgroup:
|
allow_create_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_create_keytab_user:
|
allow_create_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_create_keytab_group:
|
allow_create_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_create_keytab_host:
|
allow_create_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_create_keytab_hostgroup:
|
allow_create_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_create_keytab_user:
|
allow_create_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_create_keytab_group:
|
allow_create_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_create_keytab_host:
|
allow_create_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_create_keytab_hostgroup:
|
allow_create_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_retrieve_keytab_user:
|
allow_create_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_retrieve_keytab_group:
|
allow_create_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_retrieve_keytab_host:
|
allow_create_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_retrieve_keytab_hostgroup:
|
allow_create_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
register: result
|
state: absent
|
||||||
failed_when: not result.changed
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_retrieve_keytab_user:
|
allow_retrieve_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_retrieve_keytab_group:
|
allow_retrieve_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_retrieve_keytab_host:
|
allow_retrieve_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_retrieve_keytab_hostgroup:
|
allow_retrieve_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_retrieve_keytab_user:
|
allow_retrieve_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_retrieve_keytab_group:
|
allow_retrieve_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_retrieve_keytab_host:
|
allow_retrieve_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_retrieve_keytab_hostgroup:
|
allow_retrieve_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
register: result
|
||||||
register: result
|
failed_when: result.changed
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
allow_retrieve_keytab_user:
|
allow_retrieve_keytab_user:
|
||||||
- user01
|
- user01
|
||||||
- user02
|
- user02
|
||||||
allow_retrieve_keytab_group:
|
allow_retrieve_keytab_group:
|
||||||
- group01
|
- group01
|
||||||
- group02
|
- group02
|
||||||
allow_retrieve_keytab_host:
|
allow_retrieve_keytab_host:
|
||||||
- "{{ host1_fqdn }}"
|
- "{{ host1_fqdn }}"
|
||||||
- "{{ host2_fqdn }}"
|
- "{{ host2_fqdn }}"
|
||||||
allow_retrieve_keytab_hostgroup:
|
allow_retrieve_keytab_hostgroup:
|
||||||
- hostgroup01
|
- hostgroup01
|
||||||
- hostgroup02
|
- hostgroup02
|
||||||
action: member
|
action: member
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is absent
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
state: absent
|
allow_retrieve_keytab_user:
|
||||||
register: result
|
- user01
|
||||||
failed_when: not result.changed
|
- user02
|
||||||
|
allow_retrieve_keytab_group:
|
||||||
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_retrieve_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_retrieve_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure service is absent, again
|
- name: Ensure service is absent
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, with multiple auth_ind values.
|
- name: Ensure service is absent, again
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
auth_ind: otp,radius
|
state: absent
|
||||||
skip_host_check: no
|
register: result
|
||||||
force: yes
|
failed_when: result.changed
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure service is present, with multiple auth_ind values, again.
|
- name: Ensure service is present, with multiple auth_ind values.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
auth_ind: otp,radius
|
auth_ind: otp,radius
|
||||||
skip_host_check: no
|
skip_host_check: no
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Clear auth_ind.
|
- name: Ensure service is present, with multiple auth_ind values, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
auth_ind: ""
|
auth_ind: otp,radius
|
||||||
skip_host_check: no
|
skip_host_check: no
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Clear auth_ind, again.
|
- name: Clear auth_ind.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
auth_ind: ""
|
auth_ind: ""
|
||||||
skip_host_check: no
|
skip_host_check: no
|
||||||
force: yes
|
force: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure services are absent.
|
- name: Clear auth_ind, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name:
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
- "HTTP/{{ svc_fqdn }}"
|
auth_ind: ""
|
||||||
- "HTTP/{{ nohost_fqdn }}"
|
skip_host_check: no
|
||||||
- HTTP/svc.ihavenodns.info
|
force: yes
|
||||||
- HTTP/no.idontexist.local
|
register: result
|
||||||
continue: yes
|
failed_when: result.changed
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure services are absent.
|
- name: Ensure services are absent.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name:
|
name:
|
||||||
- "HTTP/{{ svc_fqdn }}"
|
- "HTTP/{{ svc_fqdn }}"
|
||||||
- "HTTP/{{ nohost_fqdn }}"
|
- "HTTP/{{ nohost_fqdn }}"
|
||||||
- HTTP/svc.ihavenodns.info
|
- HTTP/svc.ihavenodns.info
|
||||||
- HTTP/no.idontexist.local
|
- HTTP/no.idontexist.local
|
||||||
continue: yes
|
continue: yes
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure SMB service is present.
|
- name: Ensure services are absent.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "{{ host1_fqdn }}"
|
name:
|
||||||
smb: yes
|
- "HTTP/{{ svc_fqdn }}"
|
||||||
netbiosname: SAMBASVC
|
- "HTTP/{{ nohost_fqdn }}"
|
||||||
register: result
|
- HTTP/svc.ihavenodns.info
|
||||||
failed_when: not result.changed
|
- HTTP/no.idontexist.local
|
||||||
|
continue: yes
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure SMB service is again.
|
- name: Ensure SMB service is present.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "{{ host1_fqdn }}"
|
name: "{{ host1_fqdn }}"
|
||||||
smb: yes
|
smb: yes
|
||||||
netbiosname: SAMBASVC
|
netbiosname: SAMBASVC
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure SMB service is absent.
|
- name: Ensure SMB service is again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "cifs/{{ host1_fqdn }}"
|
name: "{{ host1_fqdn }}"
|
||||||
state: absent
|
smb: yes
|
||||||
register: result
|
netbiosname: SAMBASVC
|
||||||
failed_when: not result.changed
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure SMB service is absent, again.
|
- name: Ensure SMB service is absent.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "cifs/{{ host1_fqdn }}"
|
name: "cifs/{{ host1_fqdn }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: not result.changed
|
||||||
|
|
||||||
# cleanup
|
- name: Ensure SMB service is absent, again.
|
||||||
- name: Cleanup test environment
|
ipaservice:
|
||||||
include_tasks: env_cleanup.yml
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
name: "cifs/{{ host1_fqdn }}"
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
- name: Cleanup test environment
|
||||||
|
include_tasks: env_cleanup.yml
|
||||||
|
when: ipa_version is version('4.7.0', '>=')
|
||||||
|
|||||||
@@ -4,478 +4,346 @@
|
|||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- include_tasks: ../env_freeipa_facts.yml
|
|
||||||
|
|
||||||
- name: Tests requiring IPA version 4.7.0+
|
# setup
|
||||||
block:
|
|
||||||
# setup
|
|
||||||
- name: Get Domain from server name
|
|
||||||
set_fact:
|
|
||||||
ipaserver_domain: "{{ ansible_fqdn.split('.')[1:] | join ('.') }}"
|
|
||||||
when: ipaserver_domain is not defined
|
|
||||||
|
|
||||||
- name: Set host1, host2 and svc hosts fqdn
|
- name: Setup test environment
|
||||||
set_fact:
|
include_tasks: env_setup.yml
|
||||||
host1_fqdn: "{{ 'host1.' + ipaserver_domain }}"
|
|
||||||
host2_fqdn: "{{ 'host2.' + ipaserver_domain }}"
|
|
||||||
svc_fqdn: "{{ 'svc.' + ipaserver_domain }}"
|
|
||||||
|
|
||||||
- name: Host absent
|
# tests
|
||||||
ipahost:
|
- name: Ensure service is present
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaservice:
|
||||||
name:
|
ipaadmin_password: SomeADMINpassword
|
||||||
- svc.ihavenodns.info
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
- "{{ host1_fqdn }}"
|
pac_type:
|
||||||
- "{{ host2_fqdn }}"
|
- MS-PAC
|
||||||
- "{{ svc_fqdn }}"
|
- PAD
|
||||||
update_dns: yes
|
auth_ind: otp
|
||||||
state: absent
|
force: no
|
||||||
|
requires_pre_auth: yes
|
||||||
|
ok_as_delegate: no
|
||||||
|
ok_to_auth_as_delegate: no
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Get IPv4 address prefix from server node
|
- name: Ensure service is present, again
|
||||||
set_fact:
|
ipaservice:
|
||||||
ipv4_prefix: "{{ ansible_default_ipv4.address.split('.')[:-1] |
|
ipaadmin_password: SomeADMINpassword
|
||||||
join('.') }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
|
pac_type:
|
||||||
|
- MS_PAC
|
||||||
|
- PAD
|
||||||
|
auth_ind: otp
|
||||||
|
force: no
|
||||||
|
requires_pre_auth: yes
|
||||||
|
ok_as_delegate: no
|
||||||
|
ok_to_auth_as_delegate: no
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Add hosts for tests.
|
- name: Modify service.
|
||||||
ipahost:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
hosts:
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
- name: "{{ host1_fqdn }}"
|
pac_type: NONE
|
||||||
ip_address: "{{ ipv4_prefix + '.201' }}"
|
ok_as_delegate: yes
|
||||||
update_dns: yes
|
ok_to_auth_as_delegate: yes
|
||||||
- name: "{{ host2_fqdn }}"
|
register: result
|
||||||
ip_address: "{{ ipv4_prefix + '.202' }}"
|
failed_when: not result.changed
|
||||||
update_dns: yes
|
|
||||||
- name: "{{ svc_fqdn }}"
|
|
||||||
ip_address: "{{ ipv4_prefix + '.203' }}"
|
|
||||||
update_dns: yes
|
|
||||||
- name: svc.ihavenodns.info
|
|
||||||
update_dns: no
|
|
||||||
force: yes
|
|
||||||
|
|
||||||
- name: Ensure testing user user01 is present.
|
- name: Modify service, again.
|
||||||
ipauser:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: user01
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
first: user01
|
pac_type: NONE
|
||||||
last: last
|
ok_as_delegate: yes
|
||||||
|
ok_to_auth_as_delegate: yes
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure testing user user02 is present.
|
- name: Ensure service is present, with host not in DNS.
|
||||||
ipauser:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: user02
|
name: HTTP/svc.ihavenodns.info
|
||||||
first: user02
|
force: yes
|
||||||
last: last
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure testing group group01 is present.
|
- name: Ensure service is present, with host not in DNS, again.
|
||||||
ipagroup:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: group01
|
name: HTTP/svc.ihavenodns.info
|
||||||
|
force: yes
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure testing group group02 is present.
|
- name: Principal host/test.example.com present in service.
|
||||||
ipagroup:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: group02
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
|
principal:
|
||||||
|
- host/test.example.com
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure testing hostgroup hostgroup01 is present.
|
- name: Principal host/test.exabple.com present in service, again.
|
||||||
ipahostgroup:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: hostgroup01
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
|
principal:
|
||||||
|
- host/test.example.com
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure testing hostgroup hostgroup02 is present.
|
- name: Principal host/test.example.com absent in service.
|
||||||
ipahostgroup:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: hostgroup02
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
|
principal:
|
||||||
|
- host/test.example.com
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure services are absent.
|
- name: Principal host/test.example.com absent in service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name:
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
- "HTTP/{{ svc_fqdn }}"
|
principal:
|
||||||
- HTTP/svc.ihavenodns.info
|
- host/test.example.com
|
||||||
state: absent
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
# tests
|
- name: Ensure host can manage service.
|
||||||
- name: Ensure service is present
|
ipaservice:
|
||||||
ipaservice:
|
ipaadmin_password: SomeADMINpassword
|
||||||
ipaadmin_password: SomeADMINpassword
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
host:
|
||||||
pac_type:
|
- "{{ host1_fqdn }}"
|
||||||
- MS-PAC
|
- "{{ host2_fqdn }}"
|
||||||
- PAD
|
action: member
|
||||||
auth_ind: otp
|
register: result
|
||||||
force: no
|
failed_when: not result.changed
|
||||||
requires_pre_auth: yes
|
|
||||||
ok_as_delegate: no
|
|
||||||
ok_to_auth_as_delegate: no
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure service is present, again
|
- name: Ensure host can manage service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type:
|
host: "{{ host1_fqdn }}"
|
||||||
- MS_PAC
|
action: member
|
||||||
- PAD
|
register: result
|
||||||
auth_ind: otp
|
failed_when: result.changed
|
||||||
force: no
|
|
||||||
requires_pre_auth: yes
|
|
||||||
ok_as_delegate: no
|
|
||||||
ok_to_auth_as_delegate: no
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
- name: Modify service.
|
- name: Ensure host cannot manage service.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type: NONE
|
host:
|
||||||
ok_as_delegate: yes
|
- "{{ host1_fqdn }}"
|
||||||
ok_to_auth_as_delegate: yes
|
- "{{ host2_fqdn }}"
|
||||||
register: result
|
action: member
|
||||||
failed_when: not result.changed
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Modify service, again.
|
- name: Ensure host cannot manage service, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
pac_type: NONE
|
host:
|
||||||
ok_as_delegate: yes
|
- "{{ host1_fqdn }}"
|
||||||
ok_to_auth_as_delegate: yes
|
- "{{ host2_fqdn }}"
|
||||||
register: result
|
action: member
|
||||||
failed_when: result.changed
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, with host not in DNS.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/svc.ihavenodns.info
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
force: yes
|
allow_create_keytab_user:
|
||||||
register: result
|
- user01
|
||||||
failed_when: not result.changed
|
- user02
|
||||||
|
allow_create_keytab_group:
|
||||||
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_create_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_create_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure service is present, with host not in DNS, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/svc.ihavenodns.info
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
force: yes
|
allow_create_keytab_user:
|
||||||
register: result
|
- user01
|
||||||
failed_when: result.changed
|
- user02
|
||||||
|
allow_create_keytab_group:
|
||||||
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_create_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_create_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Principal host/test.example.com present in service.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
allow_create_keytab_user:
|
||||||
- host/test.example.com
|
- user01
|
||||||
action: member
|
- user02
|
||||||
register: result
|
allow_create_keytab_group:
|
||||||
failed_when: not result.changed
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_create_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_create_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Principal host/test.exabple.com present in service, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
allow_create_keytab_user:
|
||||||
- host/test.example.com
|
- user01
|
||||||
action: member
|
- user02
|
||||||
register: result
|
allow_create_keytab_group:
|
||||||
failed_when: result.changed
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_create_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_create_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Principal host/test.example.com absent in service.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
allow_retrieve_keytab_user:
|
||||||
- host/test.example.com
|
- user01
|
||||||
action: member
|
- user02
|
||||||
state: absent
|
allow_retrieve_keytab_group:
|
||||||
register: result
|
- group01
|
||||||
failed_when: not result.changed
|
- group02
|
||||||
|
allow_retrieve_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_retrieve_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Principal host/test.example.com absent in service, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
principal:
|
allow_retrieve_keytab_user:
|
||||||
- host/test.example.com
|
- user01
|
||||||
action: member
|
- user02
|
||||||
state: absent
|
allow_retrieve_keytab_group:
|
||||||
register: result
|
- group01
|
||||||
failed_when: result.changed
|
- group02
|
||||||
|
allow_retrieve_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_retrieve_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure host can manage service.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host:
|
allow_retrieve_keytab_user:
|
||||||
- "{{ host1_fqdn }}"
|
- user01
|
||||||
- "{{ host2_fqdn }}"
|
- user02
|
||||||
action: member
|
allow_retrieve_keytab_group:
|
||||||
register: result
|
- group01
|
||||||
failed_when: not result.changed
|
- group02
|
||||||
|
allow_retrieve_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_retrieve_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: not result.changed
|
||||||
|
|
||||||
- name: Ensure host can manage service, again.
|
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups, again.
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host: "{{ host1_fqdn }}"
|
allow_retrieve_keytab_user:
|
||||||
action: member
|
- user01
|
||||||
register: result
|
- user02
|
||||||
failed_when: result.changed
|
allow_retrieve_keytab_group:
|
||||||
|
- group01
|
||||||
|
- group02
|
||||||
|
allow_retrieve_keytab_host:
|
||||||
|
- "{{ host1_fqdn }}"
|
||||||
|
- "{{ host2_fqdn }}"
|
||||||
|
allow_retrieve_keytab_hostgroup:
|
||||||
|
- hostgroup01
|
||||||
|
- hostgroup02
|
||||||
|
action: member
|
||||||
|
state: absent
|
||||||
|
register: result
|
||||||
|
failed_when: result.changed
|
||||||
|
|
||||||
- name: Ensure host cannot manage service.
|
#
|
||||||
ipaservice:
|
- name: Ensure service is absent
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaservice:
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
ipaadmin_password: SomeADMINpassword
|
||||||
host:
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
- "{{ host1_fqdn }}"
|
state: absent
|
||||||
- "{{ host2_fqdn }}"
|
register: result
|
||||||
action: member
|
failed_when: not result.changed
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure host cannot manage service, again.
|
- name: Ensure service is absent, again
|
||||||
ipaservice:
|
ipaservice:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
name: "HTTP/{{ svc_fqdn }}"
|
||||||
host:
|
state: absent
|
||||||
- "{{ host1_fqdn }}"
|
register: result
|
||||||
- "{{ host2_fqdn }}"
|
failed_when: result.changed
|
||||||
action: member
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups.
|
# cleanup
|
||||||
ipaservice:
|
- name: Cleanup test environment
|
||||||
ipaadmin_password: SomeADMINpassword
|
include_tasks: env_cleanup.yml
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_create_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_create_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_create_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_create_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab present for users, groups, hosts and hostgroups, again.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_create_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_create_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_create_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_create_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_create_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_create_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_create_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_create_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_create_keytab absent for users, groups, hosts and hostgroups, again.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_create_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_create_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_create_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_create_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_retrieve_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_retrieve_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_retrieve_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_retrieve_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab present for users, groups, hosts and hostgroups, again.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_retrieve_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_retrieve_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_retrieve_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_retrieve_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_retrieve_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_retrieve_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_retrieve_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_retrieve_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Service "HTTP/{{ svc_fqdn }}" members allow_retrieve_keytab absent for users, groups, hosts and hostgroups, again.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
allow_retrieve_keytab_user:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
allow_retrieve_keytab_group:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
allow_retrieve_keytab_host:
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
allow_retrieve_keytab_hostgroup:
|
|
||||||
- hostgroup01
|
|
||||||
- hostgroup02
|
|
||||||
action: member
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
#
|
|
||||||
- name: Ensure service is absent
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: not result.changed
|
|
||||||
|
|
||||||
- name: Ensure service is absent, again
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name: "HTTP/{{ svc_fqdn }}"
|
|
||||||
state: absent
|
|
||||||
register: result
|
|
||||||
failed_when: result.changed
|
|
||||||
|
|
||||||
# cleanup
|
|
||||||
|
|
||||||
- name: Ensure services are absent.
|
|
||||||
ipaservice:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- "HTTP/{{ svc_fqdn }}"
|
|
||||||
- HTTP/svc.ihavenodns.info
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure host is absent
|
|
||||||
ipahost:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- "{{ svc_fqdn }}"
|
|
||||||
- "{{ host1_fqdn }}"
|
|
||||||
- "{{ host2_fqdn }}"
|
|
||||||
- svc.ihavenodns.info
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure testing users are absent.
|
|
||||||
ipauser:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- user01
|
|
||||||
- user02
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure testing groups are absent.
|
|
||||||
ipagroup:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- group01
|
|
||||||
- group02
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure testing hostgroup hostgroup01 is absent.
|
|
||||||
ipagroup:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- hostgroup01
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Ensure testing hostgroup hostgroup02 is absent.
|
|
||||||
ipagroup:
|
|
||||||
ipaadmin_password: SomeADMINpassword
|
|
||||||
name:
|
|
||||||
- hostgroup02
|
|
||||||
state: absent
|
|
||||||
when: ipa_version is version('4.7.0', '>=')
|
|
||||||
|
|||||||
Reference in New Issue
Block a user