---
# tasks file for ansible-role-quassel-core
- name: Add quassel ppa
  apt_repository: repo='ppa:mamarley/quassel'
  when: ansible_distribution == 'Ubuntu'

- name: Add build-dependency PPA on Ubuntu 12.04
  apt_repository: repo='ppa:mamarley/build-dep'
  when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04'

- name: Install quassel-core
  apt: name=quassel-core state=latest

- name: Set quassel-core port
  lineinfile: dest=/etc/default/quasselcore regexp='^PORT' line='PORT="{{ quasselcore_port }}"' owner=root group=root mode=0644
  notify:
  - restart quassel-core

- name: Enable quassel-core on boot
  service: name=quasselcore state=started enabled=yes

- name: Setup ufw firewall rule
  ufw: rule=allow port={{ quasselcore_port }} proto=tcp
  when: quasselcore_setup_ufw

---
# tasks file for ansible-role-quassel-core
- name: Add quassel ppa
  apt_repository: repo='ppa:mamarley/quassel'
  when: ansible_distribution == 'Ubuntu'

- name: Install quassel-core
  apt: name=quassel-core state=latest

- name: Set quassel-core port
  lineinfile: dest=/etc/default/quasselcore regexp='^PORT' line='PORT="{{ quasselcore_port }}"' owner=root group=root mode=0644
  notify:
  - restart quassel-core

- name: Enable quassel-core on boot
  service: name=quasselcore state=started enabled=yes

- name: Setup ufw firewall rule
  ufw: rule=allow port={{ quasselcore_port }} proto=tcp
  when: quasselcore_setup_ufw

Remove dependency only required for Ubuntu 12.04
Remove dependency only required for Ubuntu 12.04
