def role(ctx, dependency_name, driver_name, lint_name, provisioner_name,
         role_name, verifier_name, template):  # pragma: no cover
    """ Initialize a new role for use with Molecule. """
    command_args = {
        'dependency_name': dependency_name,
        'driver_name': driver_name,
        'lint_name': lint_name,
        'provisioner_name': provisioner_name,
        'role_name': role_name,
        'scenario_name': command_base.MOLECULE_DEFAULT_SCENARIO_NAME,
        'subcommand': __name__,
        'verifier_name': verifier_name,
    }

    if verifier_name == 'inspec':
        command_args['verifier_lint_name'] = 'rubocop'

    if verifier_name == 'goss':
        command_args['verifier_lint_name'] = 'yamllint'

    if verifier_name == 'ansible':
        command_args['verifier_lint_name'] = 'ansible-lint'

    if template is not None:
        command_args['template'] = template

    r = Role(command_args)
    r.execute()
def role ( ctx , dependency_name , driver_name , lint_name , provisioner_name , role_name , verifier_name , template ) : command_args = { 'dependency_name' : dependency_name , 'driver_name' : driver_name , 'lint_name' : lint_name , 'provisioner_name' : provisioner_name , 'role_name' : role_name , 'scenario_name' : command_base . MOLECULE_DEFAULT_SCENARIO_NAME , 'subcommand' : __name__ , 'verifier_name' : verifier_name , } if verifier_name == 'inspec' : command_args [ 'verifier_lint_name' ] = 'rubocop' if verifier_name == 'goss' : command_args [ 'verifier_lint_name' ] = 'yamllint' if verifier_name == 'ansible' : command_args [ 'verifier_lint_name' ] = 'ansible-lint' if template is not None : command_args [ 'template' ] = template r = Role ( command_args ) r . execute ( )
Initialize a new role for use with Molecule.