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
   - slurp:
      src: /etc/default/grub
     register: r
   - name: Check whether AutoNuma is disabled
     debug: msg="Found it"


<snip />

TASK [Check whether AutoNuma is disabled]
skipping: []

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

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

Reply via email to