mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Converted empty inventory error to warning
This commit is contained in:
parent
e1f2cb1d37
commit
8dcffaf56f
1 changed files with 2 additions and 0 deletions
|
@ -167,6 +167,8 @@ def main(args):
|
||||||
|
|
||||||
inventory = ansible.inventory.Inventory(options.inventory, vault_password=vault_pass)
|
inventory = ansible.inventory.Inventory(options.inventory, vault_password=vault_pass)
|
||||||
inventory.subset(options.subset)
|
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
|
# run all playbooks specified on the command line
|
||||||
for playbook in args:
|
for playbook in args:
|
||||||
|
|
Loading…
Reference in a new issue