From 7aeb2e971ccfa220f4a186daa8d16b7dc606a983 Mon Sep 17 00:00:00 2001 From: Will Miller Date: Tue, 28 Aug 2018 16:42:17 +0000 Subject: [PATCH] Check existence of node types referenced in specs --- ansible/schedule.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/schedule.yml b/ansible/schedule.yml index 13937c5..4ed7d43 100644 --- a/ansible/schedule.yml +++ b/ansible/schedule.yml @@ -1,4 +1,10 @@ --- +- name: Check that all specified node types exist + fail: + msg: The non-existent node type {{ item }} was specified in 'specs'. + when: item not in node_types + loop: "{{ specs.keys() }}" + # Creates a dict mapping each hypervisor's hostname to its hostvars, to be used # during scheduling. - name: Collect hypervisor hostvars