Unsupported parameters for (yum) module: enabled

tasks:

  • name: Start and enable vmtoolsd

yum: name=vmtoolsd state=started enabled=yes

How to resolve below error ?

fatal: [<IP_ADDRESS>]: FAILED! => {“changed”: false, “msg”: “Unsupported parameters for (yum) module: enabled Supported parameters include: allow_downgrade, autoremove, bugfix, conf_file, disable_excludes, disable_gpg_check, disable_plugin, disablerepo, download_dir, download_only, enable_plugin, enablerepo, exclude, install_repoquery, install_weak_deps, installroot, list, lock_timeout, name, releasever, security, skip_broken, state, update_cache, update_only, use_backend, validate_certs”}

tasks:
- name: Start and enable vmtoolsd
yum: name=vmtoolsd state=started enabled=yes

How to resolve below error ?

fatal: [<IP_ADDRESS>]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (yum) module: enabled Supported
parameters include: allow_downgrade, autoremove, bugfix, conf_file, disable_excludes, disable_gpg_check, disable_plugin,
disablerepo, download_dir, download_only, enable_plugin, enablerepo, exclude, install_repoquery, install_weak_deps,
installroot, list, lock_timeout, name, releasever, security, skip_broken, state, update_cache, update_only, use_backend,
validate_certs"}

The yum module installs packages but it is not managing services.

Regards
           Racke

Thank you Racke for your reply.

I could solve this by updating the task as below.

tasks

  • name: Start and enable vmtoolsd
    service: name=vmtoolsd state=started enabled=yes