On Sunday, March 11, 2018 at 8:48:24 PM UTC+8, Kai Stian Olstad wrote:
>
> On 11.03.2018 13:17, Vino B wrote: 
> >   Below is the playbook does not execute the debug part , can you help 
> > me 
> > what is wrong in the below play book. 
> > 
> > --- 
> > - hosts: target 
> >   remote_user: ansible 
> >   become: true 
> >   become_method: sudo 
> >   tasks: 
> >    - slurp: 
> >       src: /etc/default/grub 
> >      register: r 
> >    - name: Check whether AutoNuma is disabled 
> >      debug: msg="Found it" 
> >      when: 
> > 
> r.content|b64decode|regex_search('^GRUB_CMDLINE_LINUX_DEFAULT=.*numa_balancing=disableX')
>  
>
> > 
> > OUTPUT: 
>
> <snip /> 
>
> > TASK [Check whether AutoNuma is disabled] 
> > 
> ******************************************************************************************************************************
>  
>
> > skipping: [10.162.54.34] 
>
> The file does not have disableX in it so it will not run the task. 
> If you are looking for the opposite behaviour you need to add "not" 
>
> when: not 
> (r.content|b64decode|regex_search('^GRUB_CMDLINE_LINUX_DEFAULT=.*numa_balancing=disableX'))
>  
>
>
>
> -- 
> Kai Stian Olstad 
>

Hi Kai,

  Thank you very much 

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f7bb7688-8a14-4554-8d2f-c537f2f424ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to