If you are able to predict the output using changed_when with register
can be useful:
For example:
...
register: cmd_result
changed_when: cmd_result.stdout != ""



On Wed, Dec 18, 2013 at 2:30 PM, Philippe Eveque
<[email protected]> wrote:
> You can use change_when: <condition>
>
> example: change_when: False
>
>
> 2013/12/18 Giorgio Valoti <[email protected]>
>>
>> Hi,
>> When a shell command is executed, Ansible consider it as a modifying
>> action. It’s a sensible default, because it can’t predict the command
>> output, but I’m wondering if there’s a way to declare a command as
>> safe/read-only?
>>
>> --
>> Giorgio Valoti
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to