very simple ad-hoc command returning an error

12 views
Skip to first unread message

Oliver Schiinke

unread,
Jan 19, 2021, 9:44:21 PM1/19/21
to Ansible Project
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!

Dick Visser

unread,
Jan 20, 2021, 1:09:35 AM1/20/21
to ansible...@googlegroups.com
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. 


--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/83d98489-4cae-4ca7-8b6b-1fd5fd2fcdacn%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Oliver Schiinke

unread,
Jan 20, 2021, 8:16:09 AM1/20/21
to Ansible Project
Thank you very much! I did not know about that package.
Reply all
Reply to author
Forward
0 new messages