- name: Add repository for atom
  apt_repository:
    repo: "deb http://ppa.launchpad.net/webupd8team/atom/ubuntu {{ ansible_distribution_release }} main"
    state: present

- name: Add key for atom repository
  apt_key:
    keyserver: keyserver.ubuntu.com
    id: EEA14886
    state: present

- name: Update apt indexes
  command: apt-get update

- name: Install packages
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - "{{ core_pkgs | default([]) }}"

- name: Install packages (specific to 14/15)
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - atsar
  when: ansible_distribution_major_version == "14" or ansible_distribution_major_version == "15"

- name: Install packages (specific to 16)
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - fonts-powerline
    - rofi
  when: ansible_distribution_major_version == "16"

- name: Install gpg for key management
  package:
    name: gnupg
    state: latest

- name: Add repository for atom
  apt_repository:
    repo: "deb http://ppa.launchpad.net/webupd8team/atom/ubuntu {{ ansible_distribution_release }} main"
    state: present

- name: Add key for atom repository
  apt_key:
    keyserver: keyserver.ubuntu.com
    id: EEA14886
    state: present

- name: Update apt indexes
  command: apt-get update

- name: Install packages
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - "{{ core_pkgs | default([]) }}"

- name: Install packages (specific to 14/15)
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - atsar
  when: ansible_distribution_major_version == "14" or ansible_distribution_major_version == "15"

- name: Install packages (specific to 16)
  package:
    name: "{{ item }}"
    state: latest
  with_items:
    - fonts-powerline
    - rofi
  when: ansible_distribution_major_version == "16"

Install gpg for apt key management
Install gpg for apt key management
