---
- name: Recognize Phusion APT key
  apt_key: keyserver=keyserver.ubuntu.com
           id=561F9B9CAC40B2F7

- name: Use Phusion APT repo
  apt_repository: repo='deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main'

- name: Install Passenger + Nginx
  apt: pkg=nginx-extras
       state=present
       update_cache=yes
  notify: Restart Nginx

- name: Set up Nginx vhost directories
  file: path=/etc/nginx/{{ item }}
        state=directory
  with_items:
    - sites-available
    - sites-enabled

- name: Set up log rotation for Nginx
  copy: src=logrotate
        dest=/etc/logrotate.d/nginx

---
- name: Recognize Phusion APT key
  apt_key: keyserver=keyserver.ubuntu.com
           id=561F9B9CAC40B2F7

- name: Use Phusion APT repo
  apt_repository: repo="deb https://oss-binaries.phusionpassenger.com/apt/passenger {{ ansible_distribution_release }} main"

- name: Install Passenger + Nginx
  apt: pkg=nginx-extras
       state=present
       update_cache=yes
  notify: Restart Nginx

- name: Set up Nginx vhost directories
  file: path=/etc/nginx/{{ item }}
        state=directory
  with_items:
    - sites-available
    - sites-enabled

- name: Set up log rotation for Nginx
  copy: src=logrotate
        dest=/etc/logrotate.d/nginx

Use correct APT release repo
Use correct APT release repo
