@@ -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 ,
@@ -321,7 +327,7 @@ def _main(
321327
322328 if any ((
323329 path .isdir (path .join (potential_deploy_dir , 'group_data' )),
324- path .isfile (path .join (potential_deploy_dir , 'config.py' )),
330+ path .isfile (path .join (potential_deploy_dir , config_filename )),
325331 )):
326332 logger .debug ('Setting directory to: {0}' .format (potential_deploy_dir ))
327333 deploy_dir = potential_deploy_dir
@@ -356,7 +362,7 @@ def _main(
356362 pseudo_config .set (config )
357363
358364 # Load up any config.py from the filesystem
359- config_filename = path .join (deploy_dir , 'config.py' )
365+ config_filename = path .join (deploy_dir , config_filename )
360366 if path .exists (config_filename ):
361367 extract_file_config (config_filename , config ) # TODO: remove this
362368 exec_file (config_filename )
0 commit comments