I've seen it used to manage deployments, and it's not perfect, but it's a lot better than expecting a whole team of engineers to muck about on the production servers and remember to get everything just right.
In fact, an expect script [can be] nicely self-documenting, because somebody can look at it and see "oh these are the steps to deploy X" because the scripts basically read as "at the foo prompt, enter bar" over and over again, with some branching to handle varying responses (missing prereq, error messages).
The "ultimate" in building environments would probably have to be something more comprehensive and declarative like bcfg (http://trac.mcs.anl.gov/projects/bcfg2) which I have seen in action and it works but is very XML-heavy.
In fact, an expect script [can be] nicely self-documenting, because somebody can look at it and see "oh these are the steps to deploy X" because the scripts basically read as "at the foo prompt, enter bar" over and over again, with some branching to handle varying responses (missing prereq, error messages).
The "ultimate" in building environments would probably have to be something more comprehensive and declarative like bcfg (http://trac.mcs.anl.gov/projects/bcfg2) which I have seen in action and it works but is very XML-heavy.