Skip to content

Commit

Permalink
fix to make the cli args consistent with function arguments
Browse files Browse the repository at this point in the history
Signed-off-by: hirokuni-kitahara <[email protected]>
  • Loading branch information
hirokuni-kitahara committed Apr 11, 2024
1 parent 9f356e7 commit 4a5f034
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ansible_risk_insight/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def __init__(self):
parser.add_argument("target_name", help="Name")
parser.add_argument("--playbook-only", action="store_true", help="if true, don't load playbooks/roles arround the specified playbook")
parser.add_argument("--taskfile-only", action="store_true", help="if true, don't load playbooks/roles arround the specified taskfile")
parser.add_argument(
"--skip-isolated-taskfiles", action="store_true", help="if true, skip isolated (not imported/included) taskfiles from roles"
)
parser.add_argument("--skip-install", action="store_true", help="if true, skip install for the specified target")
parser.add_argument("--dependency-dir", nargs="?", help="path to a directory that have dependencies for the target")
parser.add_argument("--collection-name", nargs="?", help="if provided, use it as a collection name")
Expand Down Expand Up @@ -133,6 +136,9 @@ def run(self):
read_ram_for_dependency = True
read_ram = False
write_ram = False
load_all_taskfiles = True
if args.skip_isolated_taskfiles:
load_all_taskfiles = False

c = ARIScanner(
root_dir=config.data_dir,
Expand Down Expand Up @@ -163,6 +169,7 @@ def run(self):
playbook_only=args.playbook_only,
taskfile_only=args.taskfile_only,
include_test_contents=args.include_tests,
load_all_taskfiles=load_all_taskfiles,
objects=args.objects,
out_dir=args.out_dir,
)

0 comments on commit 4a5f034

Please sign in to comment.