---
# Some of the tasks below use 'raw', as more abstracted tasks such as 'apt'
# or 'shell' require python to be already installed. This can not be
# guaranteed at this point, so we will use raw until we installed all the
# necessary stuff.

# first update the apt cache.
- name: "repositories are up to date"
  raw: "apt-get update"
  changed_when: False

# install all requirements for ansible
- name: "python is installed"
  raw: "apt-get --yes install python python-apt"
  changed_when: False

# At this point we can use the extra functionality from the installed
# libraries and no longer need to use 'raw'.
# ----- below this line, everything is allowed :) -----