Skip to content
Snippets Groups Projects
Commit e0b180e1 authored by Pierre Riteau's avatar Pierre Riteau
Browse files

Fix help texts of inventory options

Passing the Kayobe or Kolla Ansible inventories as comma-separated host
list was never supported since we check that inventory directories
exist.

Also fix the check for the Kolla Ansible inventory directory, which was
using the wrong variable (parsed_args.kolla_venv).

Change-Id: I215f927d8249aadd9cc7bb44893e0bdf5f26510a
parent ea54f822
No related branches found
No related tags found
No related merge requests found
......@@ -58,8 +58,7 @@ def add_args(parser):
parser.add_argument("-i", "--inventory", metavar="INVENTORY",
action="append",
help="specify inventory host path "
"(default=$%s/inventory or %s/inventory) or "
"comma-separated host list" %
"(default=$%s/inventory or %s/inventory) " %
(CONFIG_PATH_ENV, DEFAULT_CONFIG_PATH))
parser.add_argument("-l", "--limit", metavar="SUBSET",
help="further limit selected hosts to an additional "
......
......@@ -50,8 +50,8 @@ def add_args(parser):
"YAML/JSON for Kolla Ansible")
parser.add_argument("-ki", "--kolla-inventory", metavar="INVENTORY",
help="specify inventory host path "
"(default=$%s/inventory or %s/inventory) or "
"comma-separated host list for Kolla Ansible" %
"(default=$%s/inventory or %s/inventory) for "
"Kolla Ansible" %
(CONFIG_PATH_ENV, DEFAULT_CONFIG_PATH))
parser.add_argument("-kl", "--kolla-limit", metavar="SUBSET",
help="further limit selected hosts to an additional "
......@@ -87,7 +87,7 @@ def _validate_args(parsed_args, inventory_filename):
sys.exit(1)
inventory = _get_inventory_path(parsed_args, inventory_filename)
result = utils.is_readable_dir(parsed_args.kolla_venv)
result = utils.is_readable_dir(inventory)
if not result["result"]:
# NOTE(mgoddard): Previously the inventory was a file, now it is a
# directory to allow us to support inventory host_vars. Support both
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment