Commit 8dcffaf5 by Jacopo

Converted empty inventory error to warning

parent e1f2cb1d
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment