From b19db21cf33e2286bcf3327bc41825c5eab3c7d6 Mon Sep 17 00:00:00 2001 From: Thomas Woerner <twoerner@redhat.com> Date: Mon, 18 Sep 2017 17:39:35 +0200 Subject: [PATCH] roles/ipaclient/tasks/install.yml: Test for empty ipaclient_principal and ipaclient_keytab --- roles/ipaclient/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml index 3ad2728d..95673eb3 100644 --- a/roles/ipaclient/tasks/install.yml +++ b/roles/ipaclient/tasks/install.yml @@ -51,11 +51,11 @@ - name: Install - Check if principal and keytab are set fail: msg="Principal and keytab cannot be used together" - when: ipaclient_principal is defined and ipaclient_keytab is defined + when: ipaclient_principal is defined and ipaclient_principal != "" and ipaclient_keytab is defined and ipaclient_keytab != "" - name: Install - Check if one of password and keytab are set fail: msg="At least one of password or keytab must be specified" - when: (ipaclient_password is undefined or ipaclient_password == "") and (ipaclient_keytab is undefined or ipaclient_keytab == "") + when: not ipatest.krb5_keytab_ok and (ipaclient_password is undefined or ipaclient_password == "") and (ipaclient_keytab is undefined or ipaclient_keytab == "") - name: Install - Purge {{ ipadiscovery.realm }} from host keytab command: /usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r "{{ ipadiscovery.realm }}" -- GitLab