# very simple ad-hoc command returning an error

**URL:** <https://forum.ansible.com/t/very-simple-ad-hoc-command-returning-an-error/34473>\
**Category:** Ansible Project\
**Created:** [January 20, 2021, 2:44am UTC](https://forum.ansible.com/t/very-simple-ad-hoc-command-returning-an-error/34473 "2021-01-20T02:44:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oliver\_Schiinke](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Oliver\_Schiinke](https://forum.ansible.com/u/Oliver_Schiinke)\
**Post date:** [January 20, 2021, 2:44am UTC](https://forum.ansible.com/t/very-simple-ad-hoc-command-returning-an-error/34473/1 "2021-01-20T02:44:20Z")

</div>

Hello,

I’m trying to run this ad-hoc command to install ntp package in a specific server:

ansible db -b -m yum -a “name=ntp state=present”

But I’m getting this error:

> FAILED! =\> {  
> “ansible\_facts”: {  
> “discovered\_interpreter\_python”: “/usr/bin/python”  
> },  
> “changed”: false,  
> “failures”: [  
> “ntp No match for argument: ntp”  
> ],  
> “msg”: “Failed to install some of the specified packages”,  
> “rc”: 1,  
> “results”:   
> }

I have checked the sintax at ansible docs and it seems to be ok.

Some idea?

Thanks!

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [January 20, 2021, 6:09am UTC](https://forum.ansible.com/t/very-simple-ad-hoc-command-returning-an-error/34473/2 "2021-01-20T06:09:13Z")

</div>

The ansible part is ok, but your target host does not know about an ‘ntp’ package.  
IIRC centos/rhel now use ‘chrony’ for time keeping.

---

<div class="post-metadata">

**Author:** ![Oliver\_Schiinke](https://avatars.discourse-cdn.com/v4/letter/o/e95f7d/32.png) [@Oliver\_Schiinke](https://forum.ansible.com/u/Oliver_Schiinke)\
**Post date:** [January 20, 2021, 1:16pm UTC](https://forum.ansible.com/t/very-simple-ad-hoc-command-returning-an-error/34473/3 "2021-01-20T13:16:08Z")

</div>

Thank you very much! I did not know about that package.
