# Learning Ansible and found issue with yum module

**URL:** <https://forum.ansible.com/t/learning-ansible-and-found-issue-with-yum-module/21898>\
**Category:** Ansible Project\
**Created:** [June 30, 2016, 12:58am UTC](https://forum.ansible.com/t/learning-ansible-and-found-issue-with-yum-module/21898 "2016-06-30T00:58:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Donald\_Macaulay](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Donald\_Macaulay](https://forum.ansible.com/u/Donald_Macaulay)\
**Post date:** [June 30, 2016, 12:58am UTC](https://forum.ansible.com/t/learning-ansible-and-found-issue-with-yum-module/21898/1 "2016-06-30T00:58:21Z")

</div>

I am running through an Ansible training course on Pluralsight and I am trying to deploy Apache from onto a remote CentOS box using (Ansible controller is also on CentOS).

The command I am using is:

ansible webservers -i inventory -m yum -a “name=httpd state=present” --sudo -ask-sudo-pass

But I get the following error:

ERROR! this task ‘yum’ has extra params, which is only allowed in the following modules: command, shell, script, include, include\_vars, add\_host, group\_by, set\_fact, raw, meta

This command works in the training material but not in my test lab so I’m a bit stuck with how to proceed.

---

<div class="post-metadata">

**Author:** ![Dan\_Lang](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@Dan\_Lang](https://forum.ansible.com/u/Dan_Lang)\
**Post date:** [June 30, 2016, 5:26pm UTC](https://forum.ansible.com/t/learning-ansible-and-found-issue-with-yum-module/21898/2 "2016-06-30T17:26:21Z")

</div>

What version of Ansible do you have? You can find that with the --version flag. You may also want to change your use of -sudo to use --become and --ask-become-pass since sudo is deprecated.

---

<div class="post-metadata">

**Author:** ![Donald\_Macaulay](https://avatars.discourse-cdn.com/v4/letter/d/e99b99/32.png) [@Donald\_Macaulay](https://forum.ansible.com/u/Donald_Macaulay)\
**Post date:** [June 30, 2016, 11:27pm UTC](https://forum.ansible.com/t/learning-ansible-and-found-issue-with-yum-module/21898/3 "2016-06-30T23:27:40Z")

</div>

I’m running 2.1.0.0.

Superb. Your suggestion worked perfectly. I didn’t realise --sudo was deprecated.
