---
- name: Install Nagios
  action: apt pkg=nagios3=3.5.1-1ubuntu1 state=installed

- name: Configure nginx site
  action: copy src=nagios.pittcsc.org dest=/etc/nginx/sites-available/nagios.pittcsc.org
  notify: Restart nginx

- name: Enable nginx site
  action: file path=/etc/nginx/sites-enabled/nagios.pittcsc.org src=/etc/nginx/sites-available/nagios.pittcsc.org state=link
  notify: Restart nginx

---
- name: Install Nagios
  action: apt pkg=nagios3=3.5.1-1ubuntu1 state=installed

- name: Configure nginx site
  action: copy src=nagios.pittcsc.org dest=/etc/nginx/sites-available/nagios.pittcsc.org
  notify: Restart nginx

- name: Enable nginx site
  action: file path=/etc/nginx/sites-enabled/nagios.pittcsc.org src=/etc/nginx/sites-available/nagios.pittcsc.org state=link
  notify: Restart nginx

- name: Allow HTTP traffic
  action: ufw direction=in proto=tcp port=80 rule=allow
  notify: Reload ufw

Allow HTTP traffic to Nagios
Allow HTTP traffic to Nagios
