From 8dcffaf56fe8d5c708709d7463c793398e06cf3f Mon Sep 17 00:00:00 2001 From: Jacopo Date: Sat, 17 Jan 2015 09:18:10 +1000 Subject: [PATCH] Converted empty inventory error to warning --- bin/ansible-playbook | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/ansible-playbook b/bin/ansible-playbook index 485f2e1f896..03ca513c122 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -167,6 +167,8 @@ def main(args): inventory = ansible.inventory.Inventory(options.inventory, vault_password=vault_pass) inventory.subset(options.subset) + if len(inventory.list_hosts()) == 0: + utils.warning("provided hosts list is empty") # run all playbooks specified on the command line for playbook in args: