aoh

A tool for running Ansible playbooks with `curl <url> | python` commands
git clone https://git.ashermorgan.net/aoh/
Log | Files | Refs | README

commit 70f2bf7d946b09bb087a268fa76270bf0d75b97a
parent f1d5331c866e3fc5827b2585e57ce8a1d1f243f8
Author: Asher Morgan <asher@ashermorgan.net>
Date:   Sun,  6 Sep 2026 19:21:51 -0700

Fix bug in playbook options type checking

Diffstat:
Maoh/playbook.py | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/aoh/playbook.py b/aoh/playbook.py @@ -30,11 +30,13 @@ class Playbook: } for key, _type in _types.items(): - if key in dict and type(dict[key]) != _type: - raise PlaybookError(f'"{key}" field must be of type {_type}') + if key in dict: + if type(dict[key]) != _type: + raise PlaybookError(f'"{key}" field must be of type ' + f'{_type}') - if _type is list and any(type(x) != str for x in dict[key]): - raise PlaybookError(f'"{key}" elements must be of type str') + if _type is list and any(type(x) != str for x in dict[key]): + raise PlaybookError(f'"{key}" elements must be of type str') self.name = name self.path = dict.get('path', name)