diff --git a/molecule/command/create.py b/molecule/command/create.py index 728c341c87..f43b29804f 100644 --- a/molecule/command/create.py +++ b/molecule/command/create.py @@ -105,7 +105,7 @@ def execute(self): @click.option( '--driver-name', '-d', - type=click.Choice(drivers()), + type=click.Choice([str(s) for s in drivers()]), help='Name of driver to use. (docker)', ) def create(ctx, scenario_name, driver_name): # pragma: no cover diff --git a/molecule/command/destroy.py b/molecule/command/destroy.py index 345d1a4d0f..e08b0ff1aa 100644 --- a/molecule/command/destroy.py +++ b/molecule/command/destroy.py @@ -118,7 +118,7 @@ def execute(self): @click.option( '--driver-name', '-d', - type=click.Choice(drivers()), + type=click.Choice([str(s) for s in drivers()]), help='Name of driver to use. (docker)', ) @click.option( diff --git a/molecule/command/init/role.py b/molecule/command/init/role.py index cbb6fb898d..0df12400fc 100644 --- a/molecule/command/init/role.py +++ b/molecule/command/init/role.py @@ -105,7 +105,7 @@ def execute(self): @click.option( '--driver-name', '-d', - type=click.Choice(api.drivers()), + type=click.Choice([str(s) for s in api.drivers()]), default='docker', help='Name of driver to initialize. (docker)', ) @@ -124,7 +124,7 @@ def execute(self): @click.option('--role-name', '-r', required=True, help='Name of the role to create.') @click.option( '--verifier-name', - type=click.Choice(api.verifiers()), + type=click.Choice([str(s) for s in api.verifiers()]), default='testinfra', help='Name of verifier to initialize. (testinfra)', ) diff --git a/molecule/command/init/scenario.py b/molecule/command/init/scenario.py index 59c11bd764..fc703a8c9e 100644 --- a/molecule/command/init/scenario.py +++ b/molecule/command/init/scenario.py @@ -188,7 +188,7 @@ def _default_scenario_exists(ctx, param, value): # pragma: no cover ) @click.option( '--verifier-name', - type=click.Choice(api.verifiers()), + type=click.Choice([str(s) for s in api.verifiers()]), default='testinfra', help='Name of verifier to initialize. (testinfra)', ) diff --git a/molecule/command/prepare.py b/molecule/command/prepare.py index 8cbd0ce71a..376bb19275 100644 --- a/molecule/command/prepare.py +++ b/molecule/command/prepare.py @@ -115,7 +115,7 @@ def execute(self): @click.option( '--driver-name', '-d', - type=click.Choice(drivers()), + type=click.Choice([str(s) for s in drivers()]), help='Name of driver to use. (docker)', ) @click.option( diff --git a/molecule/command/test.py b/molecule/command/test.py index 27fe9a14fe..cea29b828f 100644 --- a/molecule/command/test.py +++ b/molecule/command/test.py @@ -104,7 +104,7 @@ def execute(self): @click.option( '--driver-name', '-d', - type=click.Choice(drivers()), + type=click.Choice([str(s) for s in drivers()]), help='Name of driver to use. (docker)', ) @click.option(