"I'd like to do something like this without having to register a
variable after all commandS:"

Short answer, no.

We briefly had something like a "last_result" but this causes some wasted
overhead to run all the time when something isn't being registered, and
especially with fact caching support now a feature in the system, we don't
want to hammer Redis like that if it were enabled.

So yes, you'll have to use register, but like Serge says, you can do it
within the same task.





On Sun, Aug 24, 2014 at 7:20 AM, Serge van Ginderachter <
[email protected]> wrote:

>
> On 24 August 2014 12:58, Akos Vandra <[email protected]> wrote:
>
>> - shell: <do something>
>>
> ​      register: donesomething​
>
> ​      changed_when: donesomething.rc != 128​
>
>
>
>  --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAEhzMJBOtmhZ%2BZkmCf7cUy5p2w8c6A7S1h7WYfqRG2PS-LetKg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAEhzMJBOtmhZ%2BZkmCf7cUy5p2w8c6A7S1h7WYfqRG2PS-LetKg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyH7U6M54%2B%3Dogm%2B8gY97KwBWk4OT1P0fBb_cTCK1FGCvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to