@@ -124,7 +124,13 @@ def _print_support(ctx, param, value):
124124@click .option (
125125 '--data' ,
126126 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' ,
128134)
129135# Auth args
130136@click .option (
@@ -276,7 +282,7 @@ def _main(
276282 winrm_username , winrm_password , winrm_port ,
277283 winrm_transport , shell_executable ,
278284 sudo , sudo_user , use_sudo_password , su_user ,
279- parallel , fail_percent , data ,
285+ parallel , fail_percent , data , config_filename ,
280286 dry , limit , no_wait , serial , quiet ,
281287 debug , debug_data , debug_facts , debug_operations ,
282288 facts = None , print_operations = None , support = None ,
@@ -324,7 +330,7 @@ def _main(
324330
325331 if any ((
326332 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 )),
328334 )):
329335 logger .debug ('Setting directory to: {0}' .format (potential_deploy_dir ))
330336 deploy_dir = potential_deploy_dir
@@ -360,7 +366,7 @@ def _main(
360366 pseudo_config .set (config )
361367
362368 # 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 )
364370 if path .exists (config_filename ):
365371 extract_file_config (config_filename , config ) # TODO: remove this
366372 exec_file (config_filename )
0 commit comments