@@ -124,7 +124,13 @@ def _print_support(ctx, param, value):
124
124
@click .option (
125
125
'--data' ,
126
126
multiple = True ,
127
- help = 'Override data values, format key=value' ,
127
+ help = 'Override data values, format key=value.' ,
128
+ )
129
+ @click .option (
130
+ '--config' ,
131
+ 'config_filename' ,
132
+ help = 'Specify config file to use (default: config.py).' ,
133
+ default = 'config.py' ,
128
134
)
129
135
# Auth args
130
136
@click .option (
@@ -276,7 +282,7 @@ def _main(
276
282
winrm_username , winrm_password , winrm_port ,
277
283
winrm_transport , shell_executable ,
278
284
sudo , sudo_user , use_sudo_password , su_user ,
279
- parallel , fail_percent , data ,
285
+ parallel , fail_percent , data , config_filename ,
280
286
dry , limit , no_wait , serial , quiet ,
281
287
debug , debug_data , debug_facts , debug_operations ,
282
288
facts = None , print_operations = None , support = None ,
@@ -324,7 +330,7 @@ def _main(
324
330
325
331
if any ((
326
332
path .isdir (path .join (potential_deploy_dir , 'group_data' )),
327
- path .isfile (path .join (potential_deploy_dir , 'config.py' )),
333
+ path .isfile (path .join (potential_deploy_dir , config_filename )),
328
334
)):
329
335
logger .debug ('Setting directory to: {0}' .format (potential_deploy_dir ))
330
336
deploy_dir = potential_deploy_dir
@@ -360,7 +366,7 @@ def _main(
360
366
pseudo_config .set (config )
361
367
362
368
# Load up any config.py from the filesystem
363
- config_filename = path .join (deploy_dir , 'config.py' )
369
+ config_filename = path .join (deploy_dir , config_filename )
364
370
if path .exists (config_filename ):
365
371
extract_file_config (config_filename , config ) # TODO: remove this
366
372
exec_file (config_filename )
0 commit comments