Check a var with 'meta noop'?

10 views
Skip to first unread message

Guy Matz

unread,
May 9, 2019, 11:55:05 AM5/9/19
to ansible...@googlegroups.com
Hi!  I have some ansible code to run a bunch of checks on a system to verify its compliance, and would like to check the kernel against an expected version.  I was hoping this would work:

- name: versions | Check kernel against expected
  meta: noop
  failed_when: false
  changed_when: ansible_kernel != expected_kernel

this just always succeeds and does not show as changed . . .  I don't actually want to run anything, so 'command: /bin/false' seems inappropriate . . .  any recommendations?

Thanks!
Guy

Brian Coca

unread,
May 13, 2019, 10:17:10 AM5/13/19
to Ansible Project
Use debug, if you don't want it to normally display anything use the
verbosity option.

--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages