---

- name: Install Nginx
  apt:
    name: "{{ item }}"
  with_items:
    - nginx
    - nginx-doc

- name: Set firewall rule for HTTP and HTTPS
  lineinfile:
    dest: /etc/shorewall/rules
    line: "ACCEPT net $FW tcp {{ item }}"
  with_items:
    - 80
    - 443
  notify:
    - Restart Shorewall

- name: Configure Nginx to not display version numbers
  copy:
    src: files/etc/nginx/conf.d/hide_versions.conf
    dest: /etc/nginx/conf.d/hide_versions.conf
  notify:
    - Check Nginx configuation
    - Reload Nginx

---

- name: Install Nginx
  apt:
    name: "{{ item }}"
    default_release: jessie-backports
  with_items:
    - nginx
    - nginx-doc

- name: Set firewall rule for HTTP and HTTPS
  lineinfile:
    dest: /etc/shorewall/rules
    line: "ACCEPT net $FW tcp {{ item }}"
  with_items:
    - 80
    - 443
  notify:
    - Restart Shorewall

- name: Configure Nginx to not display version numbers
  copy:
    src: files/etc/nginx/conf.d/hide_versions.conf
    dest: /etc/nginx/conf.d/hide_versions.conf
  notify:
    - Check Nginx configuation
    - Reload Nginx

Install a newer version of Nginx than comes w/ Debian Jessie
Install a newer version of Nginx than comes w/ Debian Jessie

We'll be using the version from Jessie Backports.
