---
# install required tools and system wide libraries

- name: install utilities
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    # required to generate secret key
    - makepasswd
    # required for make/compilemessages
    - gettext
  when: support_django

- name: install library headers for pillow
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libjpeg-dev
    - libtiff-dev
    - zlib1g-dev
    - libfreetype6-dev
    - liblcms2-dev
  when: support_pillow

- name: install library headers for lxml
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libxml2-dev
    - libxslt1-dev
    - zlib1g-dev
  when: support_lxml

- name: install library headers for mysql
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libmysqlclient-dev
  when: support_mysql

- name: install library headers for cffi support
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libffi-dev
  when: support_cffi

---
# install required tools and system wide libraries

- name: install utilities
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    # required to generate secret key
    - makepasswd
    # required for make/compilemessages
    - gettext
    # required to build anything
    - build-essential
  when: support_django

- name: install library headers for pillow
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libjpeg-dev
    - libtiff-dev
    - zlib1g-dev
    - libfreetype6-dev
    - liblcms2-dev
  when: support_pillow

- name: install library headers for lxml
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libxml2-dev
    - libxslt1-dev
    - zlib1g-dev
  when: support_lxml

- name: install library headers for mysql
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libmysqlclient-dev
  when: support_mysql

- name: install library headers for cffi support
  apt: name={{ item }} state=latest update_cache=yes
  with_items:
    - libffi-dev
  when: support_cffi

Make sure build-essential is installed
Make sure build-essential is installed
