Do publishers care if a book manuscript was freely posted online (e.g., made open-access with a CC license) before submission to the publisher?
Data point: within the last two years, Cambridge University Press made a deal with me, without fuss, that will allow me to put a PDF of a forthcoming monograph on-line without any waiting period ("embargo"?). The deal was that I forego "e-book" sales. The general philosophy was explained to me by the acquisitions editor as "we're not for profit, but we try to not lose money".
Another enterprise whose implications I've not thought about too much, is the Amer. Math. Soc.'s relatively recent program to have lightly-vetted PDF "books" on their site, to invite comments and so on... most likely toward eventual publication... but without any apparent obligation from authors. I was solicited to put some of my notes into that machine, and, even when I commented that many of these would never become any sort of physical book (mostly because of all that entails, but also because of the paywall/editorial-corruption, ...) the acquisitions editor said it didn't matter. Yes, that is what I would have said, too, if I were an acquisitions editor trying to engage established writers-of-notes, but, still, ...
As usual, these situations can be evaluated by the "value added" criterion, where "value" of course includes, status, money, etc, and the relative value of those things to the parties involved. The value added of a physical book is ever harder to understand, but to many it is still considerable. Indeed, having committed to CUP to make a physical book (beyond on-line PDFs), I did feel compelled to put a great deal extra effort into minimizing flaws... which are essentially uncorrectible in a physical object, but are endlessly correctible in an on-line document.
I think that, unsurprisingly, we're still in a crazy transition period while publishers figure out how to cope with the internet, and academics figure out that literal "publication" is no longer bottle-necked through "publishers". That is, acquisition of "status" points enough to get tenure or get grants once was only possible through conventional publishers (and whatever procedures they hit upon), but now there are choices. In many peoples' minds, "publication" has inherited the archaic sense of "published through conventional publisher, with whatever vetting (in some peer-review sense) procedure they declare, as opposed literal publication. Perhaps unimaginably, once-upon-a-time, there was really no such thing as publication other than that now-archaic one. The habits and conventions of it permeate academe, along with self-perpetuating mythologies and traditions.
Happily, some publishers (maybe not the ones panicking at loss of traditional high profit margins) have caught on to the fact that the internet "is a thing", and that many modestly technically savvy people can create PDFs that are as good as anything their own "typesetters" can create. Rather than pretending otherwise, they're adapting.
The question is probably too broad as every publisher may act differently, and also differently in different cases, but I have one point to add: I've been contacted by one publisher and asked if I'd like to submit one of my lecture notes that has been freely available on my homepage for publication as a book. I did just for fun, got some reviews back, reviews were positive in general, but asked for more material and I did not continue to work on it up to now.
So the answer is: Ask the publisher.
Yes, they care because it reduces the market for your book and thus their potential profits from sales. But some publishers care more than others. There are four classes of publishers: vanity presses, print on demand, trade presses, and academic presses.
Vanity Presses earn profits by charging you up front for the publishing costs. So they don't care if the book has been published before, as long as you're willing to pay upfront. They may hide these costs by calling them production costs, editorial costs, or by requiring you to purchase a certain number of books ahead of time at 'discount.'
Print on demand essentially have no overhead as they only print a copy of your book if someone buys it. They usually don't provide any advertising or production support. Since their overhead is zilch and they profit whenever a copy is sold, they would be willing to take your book. Amazon's CreateSpace is an example of a print on demand publisher.
Trade Presses earn their profits solely off sales of the book. They won't be interested in a volume that is available elsewhere for free. You've effectively undersold your own market.
Academic Presses used to be subsidized heavily by their universities, which allowed them to print low-volume academic treatises, but this is no longer the case. They are increasingly being required to show profit and thus they are increasingly less likely to choose books that carry neither prestige or sales volume. They would shy away from a book that has already been released CC unless you were a Very Famous Person®. There are some presses such as UCal Press which are experimenting with Creative Commons books that are also available through print-on-demand, but they are the minority.
tl;dr: Try selling your book to a vanity press or print on demand press as they are the most likely to take a book that's already available for free.