I'm getting this below error while running my ansible playbook
my yaml file :
---
- hosts: ubuntu
become: yes
remote_user: ansible
tasks:
- name: update the cache
apt:
name: update
update_cache: yes
- name: This will install apache
apt:
name:apache2
state:present
Error: exception type: exception: this task 'apt' has extra params, which is only allowed in the following modules: command, win_command, shell, win_shell, script, include, include_vars, include_tasks, include_role, import_tasks, import_role, add_host, group_by, set_fact, raw, meta
The error appears to have been in '/home/ansible/playbooks/apache.yml': line 10, column 5, but may be elsewhere in the file depending on the exact syntax problem.