summaryrefslogtreecommitdiffstats
path: root/bin/ansible-playbook
diff options
context:
space:
mode:
authorJacopo <dedalusj@gmail.com>2015-01-17 00:18:10 +0100
committerJacopo <dedalusj@gmail.com>2015-01-17 00:20:40 +0100
commit8dcffaf56fe8d5c708709d7463c793398e06cf3f (patch)
treee4ea61b1b8a30ed6885b96310635f3cf54ef4c4d /bin/ansible-playbook
parentRemoved early check for empty inventory (diff)
downloadansible-8dcffaf56fe8d5c708709d7463c793398e06cf3f.tar.xz
ansible-8dcffaf56fe8d5c708709d7463c793398e06cf3f.zip
Converted empty inventory error to warning
Diffstat (limited to 'bin/ansible-playbook')
-rwxr-xr-xbin/ansible-playbook2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/ansible-playbook b/bin/ansible-playbook
index 485f2e1f89..03ca513c12 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: