diff --git a/kolla_ansible/cmd/genpwd.py b/kolla_ansible/cmd/genpwd.py
index 17c37efb361a6881be247feba88b00b7173be435..6927bd5e91344466f910d85d052a5d0efc525376 100755
--- a/kolla_ansible/cmd/genpwd.py
+++ b/kolla_ansible/cmd/genpwd.py
@@ -59,6 +59,10 @@ def genpwd(passwords_file, length, uuid_keys, ssh_keys, blank_keys,
     with open(passwords_file, 'r') as f:
         passwords = yaml.safe_load(f.read())
 
+    if not isinstance(passwords, dict):
+        print("ERROR: Passwords file not in expected key/value format")
+        sys.exit(1)
+
     for k, v in passwords.items():
         if (k in ssh_keys and
                 (v is None or
diff --git a/kolla_ansible/cmd/mergepwd.py b/kolla_ansible/cmd/mergepwd.py
index 850a36cf3269a340f9ec4298957ffcbbaf46177e..f7d3c7c50af14601518fc9273c9f5e4b029d40c4 100755
--- a/kolla_ansible/cmd/mergepwd.py
+++ b/kolla_ansible/cmd/mergepwd.py
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 import argparse
+import sys
 import yaml
 
 
@@ -23,6 +24,14 @@ def mergepwd(old, new, final, clean=False):
     with open(new, "r") as new_file:
         new_passwords = yaml.safe_load(new_file)
 
+    if not isinstance(old_passwords, dict):
+        print("ERROR: Old passwords file not in expected key/value format")
+        sys.exit(1)
+
+    if not isinstance(new_passwords, dict):
+        print("ERROR: New passwords file not in expected key/value format")
+        sys.exit(1)
+
     if clean:
         # keep only new keys
         for key in new_passwords:
diff --git a/releasenotes/notes/improve-pwd-errors-7563a3cc941c3091.yaml b/releasenotes/notes/improve-pwd-errors-7563a3cc941c3091.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..75f3f48156020824362c797ad5b6acd57dcfe8e2
--- /dev/null
+++ b/releasenotes/notes/improve-pwd-errors-7563a3cc941c3091.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    Improves error reporting in ``kolla-genpwd`` and ``kolla-mergepwd`` when
+    input files are not in the expected format. `LP#1880220
+    <https://bugs.launchpad.net/kolla-ansible/+bug/1880220>`__.