Skip to content

Commit

Permalink
Merge pull request freeipa#311 from rjeffman/service_fix_krb5_ticket
Browse files Browse the repository at this point in the history
Fixes ipaservice disable tests.
  • Loading branch information
Sergio Oliveira authored Jun 29, 2020
2 parents 464eae1 + 957b591 commit 097a342
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/service/test_service_disable.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# Due to not having some Ansible modules for IPA, some tasks are executed
# in this playbook using the `shell` module, as a Kerberos tikcket is needed
# for these tasks.
# The Kerberos cache is cleaned in the end, so you might need to `kinit` on
# the testing target after running this playbook.
---
- name: Playbook to manage IPA service.
hosts: ipaserver
become: yes
gather_facts: yes

environment:
KRB5CCNAME: test_service_disable_ccache

tasks:
- name: Get Kerberos ticket for `admin`.
shell: echo SomeADMINpassword | kinit -c ${KRB5CCNAME} admin

- name: Ensure service is absent
ipaservice:
ipaadmin_password: SomeADMINpassword
name: "mysvc1/{{ ansible_fqdn }}"
state: absent

- name: Ensure service is present
ipaservice:
Expand Down Expand Up @@ -66,3 +78,6 @@
ipaservice:
ipaadmin_password: SomeADMINpassword
name: "mysvc1/{{ ansible_fqdn }}"

- name: Destroy Kerberos tickets.
shell: kdestroy -A -q -c ${KRB5CCNAME}

0 comments on commit 097a342

Please sign in to comment.