---
  - name: Install IceCast2
    become: true
    apt: deb=http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/amd64/icecast2_2.4.2-2_amd64.deb

  - name: Install LiquidSoap
    become: true
    apt: pkg="{{ item }}" install_recommends=yes state=latest
    with_items:
     - liquidsoap
     - liquidsoap-plugin-all

  - name: Link Fallback Error MP3
    file: src="{{ www_base }}/resources/error.mp3" dest="/usr/share/icecast2/web/error.mp3" state=link
---
  - name: Install IceCast2 (14.04)
    become: true
    apt: deb=http://download.opensuse.org/repositories/multimedia:/xiph/xUbuntu_14.04/amd64/icecast2_2.4.2-2_amd64.deb
    when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'

  - name: Install IceCast2 (16.04)
    become: true
    apt: pkg=icecast2 state=latest
    when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial'

  - name: Install LiquidSoap
    become: true
    apt: pkg="{{ item }}" install_recommends=yes state=latest
    with_items:
     - liquidsoap
     - liquidsoap-plugin-all

  - name: Link Fallback Error MP3
    file: src="{{ www_base }}/resources/error.mp3" dest="/usr/share/icecast2/web/error.mp3" state=link
Use system icecast2 package for 16.04 Ansible deploy.
Use system icecast2 package for 16.04 Ansible deploy.
