Benifit is reducing 2 tasks in one task ! Or 10 tasks in 5 tasks ! If it
can be done !

On Wed, 29 Jul 2020 at 13:41, Stefan Hornburg (Racke) <[email protected]>
wrote:

> On 7/29/20 9:58 AM, Rahul Kumar wrote:
> > Hi Ansible Gurus,
> > Is it possible to print some message in the task itself when condition
> is not matched , rather than having new task with
> > debug module ?
> >
> > Example: currently i am writing two tasks:
> >  - name: Get Active Application server
> >       debug:
> >         msg: "No active Application server found. "
> >       when: app_server_result is failed
> >   tasks:
> >
> >     - include_role:
> >         name: myrole
> >         tasks_from: myapplicaton_server
> >       when: app_server_result is not failed
> >
> > can we avoid debug statement here and can manage only with second task ?
>
> Not to my knowledge and the benefits are unclear to me.
>
> Regards
>          Racke
>
> >
> > --
> > 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] <mailto:
> [email protected]>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ansible-project/CAGH8rEw3Z6eKV9SCKOVv_edyXx1UReiomktH3oKkDP85OMR%3DfA%40mail.gmail.com
> > <
> https://groups.google.com/d/msgid/ansible-project/CAGH8rEw3Z6eKV9SCKOVv_edyXx1UReiomktH3oKkDP85OMR%3DfA%40mail.gmail.com?utm_medium=email&utm_source=footer
> >.
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/fae1a093-abcc-f131-db95-e30242f5f29f%40linuxia.de
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAGH8rEzBFkwdriVMcohAtiDrBvoo30uyioBucJjR5jfB5FA%2Bwg%40mail.gmail.com.

Reply via email to