---
- name: Configure web server(s)
  hosts: webservers
  sudo: yes
  vars:
    docroot: /vagrant_data/_site
    backendroot: /vagrant_data/src/sponsorship-form
    server_name: localhost
  vars_files:
  - [ "secrets.yml", "secrets.nodeless.yml" ]
  roles:
    - role: webserver
      content_owner: vagrant
    - role: bennojoy.nginx
      nginx_http_params:
        sendfile: "on"
        access_log: /var/log/nginx/access.log
      nginx_sites:
      - server:
          file_name: developer.rackspace.com
          listen: 80
          server_name: "{{ server_name }}"
          root: "{{ docroot }}"
          location1:
            name: /api
            proxy_pass: http://127.0.0.1:8111
          location2:
            name: /blog/index.html
          location3:
            name: /blog
            rewrite: "^/blog/([^/]+)\\.html$ /blog/$1/ permanent"
    - jekyll
    - sphinx
    - dev

- name: Launch the backend form submission script
  hosts: webservers
  vars:
    docroot: /vagrant_data/_site
    backendroot: /vagrant_data/src/sponsorship-form
    sourceroot: /vagrant_data/
  roles:
    - role: content
      srcroot: /vagrant_data
      foreverargs: --watch --watchDirectory {{ backendroot }}

---
- name: Configure web server(s)
  hosts: webservers
  sudo: yes
  vars:
    docroot: /vagrant_data/_site
    backendroot: /vagrant_data/src/sponsorship-form
    server_name: localhost
  vars_files:
  - vars.yml
  - [ "secrets.yml", "secrets.nodeless.yml" ]
  roles:
    - role: webserver
      content_owner: vagrant
    - role: bennojoy.nginx
      nginx_http_params:
        sendfile: "on"
        access_log: /var/log/nginx/access.log
      nginx_sites:
      - server:
          file_name: developer.rackspace.com
          listen: 80
          server_name: "{{ server_name }}"
          root: "{{ docroot }}"
          location1:
            name: /api
            proxy_pass: http://127.0.0.1:8111
          location2:
            name: /blog/index.html
          location3:
            name: /blog
            rewrite: "^/blog/([^/]+)\\.html$ /blog/$1/ permanent"
    - jekyll
    - sphinx
    - dev

- name: Launch the backend form submission script
  hosts: webservers
  vars:
    docroot: /vagrant_data/_site
    backendroot: /vagrant_data/src/sponsorship-form
    sourceroot: /vagrant_data/
  roles:
    - role: content
      srcroot: /vagrant_data
      foreverargs: --watch --watchDirectory {{ backendroot }}

Include vars file so there are no undefined references.
Include vars file so there are no undefined references.
