# fatal Error when using uname -r command

**URL:** <https://forum.ansible.com/t/fatal-error-when-using-uname-r-command/29926>\
**Category:** Ansible Project\
**Created:** [March 20, 2019, 5:20pm UTC](https://forum.ansible.com/t/fatal-error-when-using-uname-r-command/29926 "2019-03-20T17:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vino\_B](https://avatars.discourse-cdn.com/v4/letter/v/839c29/32.png) [@Vino\_B](https://forum.ansible.com/u/Vino_B)\
**Post date:** [March 20, 2019, 5:20pm UTC](https://forum.ansible.com/t/fatal-error-when-using-uname-r-command/29926/1 "2019-03-20T17:20:46Z")

</div>

Hi All,

Request you help on how to resolve the the below task error as it is throwing fatal error

- name: Check whether Kernel is latest  
shell: (/usr/bin/uname -r | {{AK}} ‘END{if(NR!=0||$0!=“4.4.155-94.50-default”){print “FAILED :Kernel Level “$0” is older”} else {print “OK”}}’)  
register: kernel\_age  
failed\_when: “‘FAILED’ in kernel\_age.stdout”  
changed\_when: false  
ignore\_errors: True  
tags: kernel

**Error:**  
**fatal:** [we1t103800002]: FAILED! =\> {“changed”: false, “cmd”: “(/usr/bin/uname -a | /usr/bin/awk ‘END{if(NR!=0||$3!="4.4.155-94.50-default"){print "FAILED :Kernel Level "$3" is older"} else {print "OK"}}’)”, “delta”: “0:00:00.004601”, “end”: “2019-03-20 17:09:56.528579”, “failed\_when\_result”: true, “rc”: 0, “start”: “2019-03-20 17:09:56.523978”, “stderr”: “”, “stderr\_lines”: , “stdout”: “FAILED :Kernel Level 4.4.155-94.50-default is older”, “stdout\_lines”: [“FAILED :Kernel Level 4.4.155-94.50-default is older”]}

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [March 20, 2019, 5:45pm UTC](https://forum.ansible.com/t/fatal-error-when-using-uname-r-command/29926/2 "2019-03-20T17:45:10Z")

</div>

You should provide all the output, if you did you will see that Ansible is working.  
This is the normal output when failed\_when is triggered.
