From e3ae3476a5fa1c615caff6dcf8c84847742cc941 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Fri, 13 Oct 2017 16:38:45 +0200
Subject: [PATCH] roles/ipaclient/tasks/install.yml: Add keytab or password
 required test

The failed test result in ipahost will not be seen because of the no_log
setting to hide the generated password.
---
 roles/ipaclient/tasks/install.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml
index f57b0285..20be7648 100644
--- a/roles/ipaclient/tasks/install.yml
+++ b/roles/ipaclient/tasks/install.yml
@@ -55,6 +55,9 @@
   # If a keytab is specified in the hostent, then the hostent will be disabled
   # if ipaclient_use_otp is set.
   - block:
+    - fail: msg="Keytab or password is required for otp"
+      when: ipaadmin_keytab is undefined and ipaadmin_password is undefined
+
     - name: Install - Get a One-Time Password for client enrollment
       no_log: yes
       ipahost:
-- 
GitLab