---
- name: Update apt
  apt: update_cache=yes

- name: Install System Packages
  apt: pkg="{{ item }}" state=latest
  with_items:
    - curl
    - wget
    - python-software-properties

- name: Install Extra Packages
  apt: pkg="{{ item }}" state=latest
  with_items: "{{ server.packages }}"
  when: server.packages is defined

- name: Configure the timezone
  template: src=timezone.tpl dest=/etc/timezone

- name: More Configure the timezone
  file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes

- name: Set default system language pack
  shell: locale-gen {{server.locale}}

