Make Composer task idempotent

This is still a temporary fix, since Composer probably needs its own module that properly checks for things. But at least it will not display the task as `changed` when it actually didn't change anything :). 

This fixes #17 
Hmn, seema a resonable solutuon!—
Sent from Mailbox

On Wed, Sep 10, 2014 at 3:04 PM, Hernandes Benevides de Sousa
<notifications@github.com> wrote:

>> @@ -28,6 +28,8 @@
>>    command: "{{ hwr_composer }} global require {{ item }}"
>>    with_items: hwr_composer_packages
>>    when: hwr_composer_packages is defined
>> +  register: composer_result
>> +  changed_when: "composer_result.rc != 0"
> Another alternative is to check the output from `composer_result` and use it as another condition for `changed_when`, that way we catch both when  there's an error and when composer installs something.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/augustohp/ansible-role-php/pull/21/files#r17377817