def METHOD_NAME(ansible_module, certnick, expected):
    """
    :Title: Run tps-activity-find with valid certnicks
    :Description: Run tps-activity-find with valid certnicks
    :Requirement: TPS Server CLI Tests
    :Setup:
        Use subsystems setup via ansible playbooks
    :Steps:
        Setup Dogtagpki using ansible playbooks
    :Expectedresults:
        Dogtagpki should be setup via ansible playbooks
    :Automated: Yes
    :CaseComponent: \-
    """
    activity_find_output = ansible_module.pki(
        cli='tps-activity-find',
        nssdb=constants.NSSDB,
        port=constants.TPS_HTTP_PORT,
        protocol='http',
        certnick=certnick,
    )
    result = None
    activity_ids = None
    for result in activity_find_output.values():
        activity_ids = re.findall("Activity ID\: [0-9]+\.[0-9]+", result['stdout'])
        activity_ids = [item.split(':')[1].strip() for item in activity_ids]
    for item in activity_ids:
        assert "Activity ID: %s" % item in result['stdout']
    for result in activity_find_output.values():
        for iter in expected:
            assert iter in result['stdout']