I'm trying to run a ansible task but I keep getting an error.
This is the play I want to run:
- name: use of handlers
hosts: all
tasks:
- name: install packages
yum:
name: httpd
state: latest
notify: restart package
handlers:
- name: restart package
service:
name: httpd
state: restarted
But this is the error that ansible gives me:
fatal: [serverb.local]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.dnf) module: notify. Supported parameters include: allowerasing, allow_downgrade, name (pkg), enablerepo, disable_excludes, conf_file, list, disable_plugin, installroot, enable_plugin, disable_gpg_check, download_dir, update_cache (expire-cache), releasever, state, nobest, bugfix, install_weak_deps, update_only, autoremove, exclude, download_only, cacheonly, security, lock_timeout, skip_broken, disablerepo, validate_certs, install_repoquery."}