On 7/28/20 1:47 PM, Rahul Kumar wrote:
> Hello Stefan ,
> Are registered variable information are available from tasks came as part of include_role?
>
> - name: Get Active Rest server
> include_role:
> name: web-server
> tasks_from: active-rest-server
>
> I registered some variable in this task active-rest-server.yml , can i use same here in above snippet as a condition in
> when ?
>
The variables registered during processing the tasks from active-rest-server.yml are not available to a regular when:,
as they are checked before the task file is loaded.
However, you probably can use them in a failed_when: condition.
Regards
Racke
>
> On Tue, 28 Jul 2020 at 13:33, Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>> wrote:
>
> On 7/28/20 9:56 AM, Rahul Kumar wrote:
> > Logic is like if an application could not be deployed , forcefully shutdown the application server rather than
> stopping
> > before only!
>
> Sounds like bandaid logic to me. I would rather fix the deployment problem.
>
> Regards
> Racke
>
> >
> > On Tue, 28 Jul 2020 at 12:56, Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>
> <mailto:
ra...@linuxia.de <mailto:
ra...@linuxia.de>>> wrote:
> >
> > On 7/28/20 9:20 AM, Rahul Kumar wrote:
> > > Ya stephan , it is bad approach I know ( Infact we should avoid ignore_errors as much as possible) ! But all
> tasks
> > post
> > > this task.. can be executed irrespective of its failure !
> >
> > Ok but what is the point to call that task, if nothing depends on it?
> >
> > Regards
> > Racke
> >
> > > So i need to , can we do that ?
> > >
> > > On Tue, 28 Jul 2020 at 12:44, Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>
> <mailto:
ra...@linuxia.de <mailto:
ra...@linuxia.de>>
> > <mailto:
ansible-project%2Bunsu...@googlegroups.com
> <mailto:
ansible-project%252Buns...@googlegroups.com> <mailto:
ansible-project%252Buns...@googlegroups.com
> <mailto:
ansible-project%25252Bun...@googlegroups.com>>>
> <mailto:
ansible-project%252Buns...@googlegroups.com> <mailto:
ansible-project%252Buns...@googlegroups.com
> <mailto:
ansible-project%25252Bun...@googlegroups.com>>>>.
> > <mailto:
ansible-project%2Bunsu...@googlegroups.com
> <mailto:
ansible-project%252Buns...@googlegroups.com> <mailto:
ansible-project%252Buns...@googlegroups.com
> <mailto:
ansible-project%25252Bun...@googlegroups.com>>>.
>
https://groups.google.com/d/msgid/ansible-project/d36e519a-1470-fc71-7bbb-d43f7b0dafd6%40linuxia.de.
>
https://groups.google.com/d/msgid/ansible-project/CAGH8rEzK%2BpJvT7%2BvnS8jo_BurPg4WX52rdzmVqV3kcGDzbdBRQ%40mail.gmail.com
> <
https://groups.google.com/d/msgid/ansible-project/CAGH8rEzK%2BpJvT7%2BvnS8jo_BurPg4WX52rdzmVqV3kcGDzbdBRQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.