mirror of
https://github.com/zerwes/ansible-fqcn-converter.git
synced 2025-02-25 18:55:30 -06:00
implemented --do-not-use-default-exclude
This commit is contained in:
parent
94f081ad5d
commit
37fddb87f7
@ -76,6 +76,13 @@ argparser.add_argument(
|
||||
default=[],
|
||||
help="path(s) to directories or files to skip.",
|
||||
)
|
||||
argparser.add_argument(
|
||||
'--do-not-use-default-exclude',
|
||||
dest="no_general_exclude_paths",
|
||||
action='store_true',
|
||||
default=False,
|
||||
help="do not use the default excludes",
|
||||
)
|
||||
argparser.add_argument(
|
||||
'-c', '--config',
|
||||
dest="config",
|
||||
@ -178,12 +185,15 @@ for fqcn in copy.copy(fqcndict).values():
|
||||
|
||||
# build exclude_paths
|
||||
exclude_paths = []
|
||||
for ep in args.exclude_paths + _general_exclude_paths:
|
||||
for ep in args.exclude_paths:
|
||||
exclude_paths.append(ep)
|
||||
if not args.no_general_exclude_paths:
|
||||
for ep in _general_exclude_paths:
|
||||
exclude_paths.append(ep)
|
||||
exclude_paths.append(args.fqcnmapfile)
|
||||
|
||||
# update some args from optional config file
|
||||
config = False
|
||||
_config = False
|
||||
if args.config:
|
||||
try:
|
||||
with open(args.config) as ymlfile:
|
||||
|
Loading…
Reference in New Issue
Block a user