Hi Guys, I get the following error while running an ansible-playbook
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in ‘/home/user/.ansible/roles/nfs/tasks/main.yml’: line 14, column 16, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
dest:/etc/exports
insertafter: EOF
^ here
This is the role i have created
`
-
name: Update apt cahce
apt: update_cache=yes cache_valid_time=3600 -
name: Install NFS Kernel on websevers
apt: name={{ item }} state=present
with_items: -
nfs-kernel-server
-
name: Update Exports file nfs
lineinfile:
dest:/etc/exports
insertafter: EOF
create: True
line: /var/www/wordpress *(insecure,rw,all_squash,anonuid=1000,anongid=1000,no_subtree_check)
notify: -
restart nfs
`
What i am doing wrong ?