def compose_command(playbook_file, inventory_path, tags, opts):
    """
    Composes a 'ansible-playbook' command for cli execution
    """
    cmd = "ansible-playbook {} -i {}".format(playbook_file, inventory_path)
    if tags:
        cmd += " -t " + tags
    if opts["check"]:
        cmd += " --check"
    if opts["diff"]:
        cmd += " --diff"
    if opts["verbose"]:
        cmd += " -" + opts["verbose"] * "v"
    return cmd