# Not sure how to fix this

**URL:** <https://forum.ansible.com/t/not-sure-how-to-fix-this/25360>\
**Category:** Ansible Project\
**Created:** [August 29, 2017, 5:11pm UTC](https://forum.ansible.com/t/not-sure-how-to-fix-this/25360 "2017-08-29T17:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry\_Eidson](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jerry\_Eidson](https://forum.ansible.com/u/Jerry_Eidson)\
**Post date:** [August 29, 2017, 5:11pm UTC](https://forum.ansible.com/t/not-sure-how-to-fix-this/25360/1 "2017-08-29T17:11:22Z")

</div>

Hello All,

I’ve been working with Ansible a few weeks. I am trying to create a list of yum file updates. I ordinarily run  
“sudo yum update --assume --changelog | tee /tmp/hostname | cut -d’.’ -f1`.txt”  
to get the update list created in the tmp directory.

In the play book I have this:

- name: create yum update list on server  
command: yum update --assumeno --changelog | tee /tmp/`hostname | cut -d'.' -f1`.txt

Partial output i get is:  
fatal: [rvavpmgt02.asd.local]: FAILED! =\> {“changed”: true, “cmd”: [“yum”, “update”, “–assumeno”, “–changelog”, “|”, “tee”, “/tmp/`hostname", "|", "cut", "-d.", "-f1`.txt”], “delta”: “0:00:00.115751”, “end”: “2017-08-29 13:06:19.590748”, “failed”: true, “rc”: 1, “start”: “2017-08-29 13:06:19.474997”, “stderr”: “CRITICAL:yum.cli:Command line error: option -d: invalid integer value: ‘.’”, “stderr\_lines”: [“CRITICAL:yum.cli:Command line error: option -d: invalid integer value: ‘.’”], “stdout”: "Usage: yum [options] COMMAND\n\nList of Commands:\n\ncheck

I’ve have tried surrounding the command with double and have also tried singe quotes to no avail. Not sure how to format.

Any Advice?

Thanks,

- jerry

---

<div class="post-metadata">

**Author:** ![Jerry\_Eidson](https://avatars.discourse-cdn.com/v4/letter/j/8edcca/32.png) [@Jerry\_Eidson](https://forum.ansible.com/u/Jerry_Eidson)\
**Post date:** [August 29, 2017, 5:27pm UTC](https://forum.ansible.com/t/not-sure-how-to-fix-this/25360/2 "2017-08-29T17:27:31Z")

</div>

Nevermind. I used shell: instead of command: and it runs.
