- name: set timezone to UTC
  lineinfile: dest=/etc/timezone state=present insertbefore=BOF
              regexp="^Etc/UTC" line="Etc/UTC"
  register: timezone

- name: reconfigure tzdata
  shell: dpkg-reconfigure -f noninteractive tzdata
  when: timezone.changed

- name: add postgres apt signing key
  apt_key: url=https://www.postgresql.org/media/keys/ACCC4CF8.asc state=present

- name: copy postgres repo source file
  template: src=pgdg.list dest=/etc/apt/sources.list.d/pgdg.list

- name: install packages
  apt: pkg={{item}} state=present update_cache=yes
  with_items:
  - build-essential
  - curl
  - gawk
  - git
  - imagemagick
  - libcurl4-openssl-dev
  - libmysqlclient-dev
  - libpq-dev
  - libpq5
  - libreadline-dev
  - libssl-dev
  - libtool
  - libxml2-dev
  - libxslt1-dev
  - libyaml-dev
  - monit
  - ntp
  - pngcrush
  - python-software-properties
  - vim
  - zlib1g-dev

- include: iptables.yml
- include: rbenv.yml

- name: set timezone to UTC
  lineinfile: dest=/etc/timezone state=present insertbefore=BOF
              regexp="^Etc/UTC" line="Etc/UTC"
  register: timezone

- name: reconfigure tzdata
  shell: dpkg-reconfigure -f noninteractive tzdata
  when: timezone.changed

- name: add postgres apt signing key
  apt_key: url=https://www.postgresql.org/media/keys/ACCC4CF8.asc state=present

- name: copy postgres repo source file
  template: src=pgdg.list dest=/etc/apt/sources.list.d/pgdg.list

- name: install packages
  apt: pkg={{item}} state=present update_cache=yes
  with_items:
  - build-essential
  - curl
  - gawk
  - git
  - imagemagick
  - libcurl4-openssl-dev
  - libmysqlclient-dev
  - libpq-dev
  - libpq5
  - libreadline-dev
  - libssl-dev
  - libtool
  - libxml2-dev
  - libxml2-utils
  - libxslt1-dev
  - libyaml-dev
  - monit
  - ntp
  - pngcrush
  - python-software-properties
  - vim
  - zlib1g-dev

- include: iptables.yml
- include: rbenv.yml

Add libxml2-utils package for xmllint.
Add libxml2-utils package for xmllint.
