I have a fairly typical set of tasks, which basically ensure that given packages are installed and up to date. I can run the playbook several times and ansible is smart enough to check whether the packages are already installed before trying to install them again. Is there a way to tie in a conditional restart similar to the way salt has watches? Basically I want to restart the server only when a change has been made.
I believe what you are looking for are handlers. See http://docs.ansible.com/playbooks_intro.html#handlers-running-operations-on-change
It allows you to define a task (handler) which can be notified to run by another task that returns a change.