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