What is the proper syntax for creating symlinks using ansible? I'm creating a Vagrant virtual environment and running ansible as my provisioner. Everything works fine up until I try to symlink to my site nginx configuration file from sites-enabled. Here is what I've tried.
- name: Create symlink to example.com
file:
path: /etc/nginx/sites-enabled/example.com
dest: /etc/nginx/sites-available/example.com
state: link
notify: nginx reload
When I do this I'm met with the following error.
ERROR: Syntax Error while loading YAML script, /Users/username/project/ansible/roles/nginx/tasks/main.yml
Note: The error may actually appear before this position: line 24, column 1
- name: Symlink to example.dev.conf
file: path=/etc/nginx/sites-enabled/example.dev.conf
state=link
^ Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.
I've also tried using src=/etc/nginx/sites-enabled instead of path but I can't seem to find a definitive example of this on the web.
Specs:
- OSX Mavericks
- vagrant 1.6.3
- VirtualBox 4.3
- nginx 1.6.0
- ansible 1.6.2
- ubuntu 14.04