- 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: 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"

Update apt index before pkg installs
Update apt index before pkg installs
