---
- name: Add the llvm APT key
  apt_key: url=http://llvm.org/apt/llvm-snapshot.gpg.key state=present

- name: Add the Ubuntu Toolchain test PPA
  apt_repository: repo=ppa:ubuntu-toolchain-r/test state=present
  when: ansible_distribution_release == "precise"

- name: Add the llvm PPA
  apt_repository: repo="deb http://llvm.org/apt/{{ ansible_distribution_release }}/ llvm-toolchain-{{ ansible_distribution_release }} main" state=present

- name: Install the LLVM/Clang packages
  apt: name={{ item }} state=present
  with_items:
    - clang-3.5
    - clang-3.5-doc
    - lldb-3.5
    - llvm-3.5
    - llvm-3.5-doc


---
- name: Add the llvm APT key
  apt_key: url=http://llvm.org/apt/llvm-snapshot.gpg.key state=present

- name: Add the Ubuntu Toolchain test PPA
  apt_repository: repo=ppa:ubuntu-toolchain-r/test state=present
  when: ansible_distribution_release == "precise"

- name: Add the llvm PPA
  apt_repository: repo="deb http://llvm.org/apt/{{ ansible_distribution_release }}/ llvm-toolchain-{{ ansible_distribution_release }} main" state=present

- name: Install the LLVM/Clang packages
  apt: name={{ item }} state=present
  with_items:
    - clang-3.6
    - clang-3.6-doc
    - lldb-3.6
    - llvm-3.6
    - llvm-3.6-doc

- name: Create alternative links for LLVM and Clang
  alternatives: name={{ item }} link=/usr/bin/{{ item }} path=/usr/bin/{{ item }}-3.6
  with_items:
    - clang
    - clang++
    - lldb

Update LLVM/Clang to 3.6, add Ubuntu alternatives settings.
Update LLVM/Clang to 3.6, add Ubuntu alternatives settings.
