ERROR! Syntax Error while loading YAML.

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 ?

luni, 25 iunie 2018, 18:34:05 UTC+3, Victor Sava a scris:

Your issue is with dest:/etc/exports. There needs to be a space after the :, so it should instead look like:

dest: /etc/exports

It looks like there is no space after the colon after “dest”…

Regards, K.

Beat me to it Matt lol