On Saturday, 10 March 2018 06.38.13 CET Vino B wrote:
>   Request your help, I need to find whether the string numa_balancing is 
> set to disabled in the file /etc/default/grub where the string in contained 
> in the string GRUB_CMDLINE_LINUX_DEFAULT any help on this is much 
> appreciated.
> 
> cat /etc/default/grub|grep GRUB_CMDLINE_LINUX_DEFAULT
> GRUB_CMDLINE_LINUX_DEFAULT="root=/dev/hda1 disk=/dev/hda resume=swap 
> console=ttyS0,115200n8 multipath=off net.ifnames=0 
> NON_PERSISTENT_DEVICE_NAMES=1 quiet elevator=noop intel_idle.max_cstate=1 
> processor.max_cstate=1 numa_balancing=disable"

There are many ways to do that, here is one

  - slurp:
      src: /etc/default/grub
    register: r

  - debug: msg="Found it"
    when: r.content | b64decode | 
regex_search('^GRUB_CMDLINE_LINUX_DEFAULT=.*numa_balancing=disable')


-- 
Kai Stian Olstad

-- 
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/84489051.ZPdZqa8G1Q%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to