def METHOD_NAME():
    """ start main program to add/delete a package to yum versionlock """
    module = AnsibleModule(
        argument_spec=dict(
            state=dict(default='present', choices=['present', 'absent']),
            name=dict(required=True, type='list', elements='str'),
        ),
        supports_check_mode=True
    )
    state = module.params['state']
    packages = module.params['name']
    changed = False
    yum_v = YumVersionLock(module)
    # Get an overview of all packages that have a version lock
    versionlock_packages = yum_v.get_versionlock_packages()
    # Ensure versionlock state of packages
    packages_list = []
    if state in ('present', ):
        command = 'add'
        for single_pkg in packages:
            if not any(match(pkg, single_pkg) for pkg in versionlock_packages.split()):
                packages_list.append(single_pkg)
        if packages_list:
            if module.check_mode:
                changed = True
            else:
                changed = yum_v.ensure_state(packages_list, command)
    elif state in ('absent', ):
        command = 'delete'
        for single_pkg in packages:
            if any(match(pkg, single_pkg) for pkg in versionlock_packages.split()):
                packages_list.append(single_pkg)
        if packages_list:
            if module.check_mode:
                changed = True
            else:
                changed = yum_v.ensure_state(packages_list, command)
    module.exit_json(
        changed=changed,
        meta={
            "packages": packages,
            "state": state
        }
    )