- name: Upgrade repo info. # Run only if didn't run in the last hour.
  apt: update_cache=yes cache_valid_time=3600

- name: Install aptitude
  apt: name=aptitude state=present

- name: Upgrade packages
  apt: upgrade=full

- name: Change the hostname
  hostname: name={{ vm_name }}
  register: hostname_set

- name: Set the hostname in the /etc/host
  lineinfile: dest=/etc/hosts line='127.0.0.1 {{ vm_name }}'
  when: hostname_set.changed

- include: git.yml
- include: tools.yml

- name: Check requirements
  fail: msg="Only debian based box are supported at this moment. You are currently using {{ ansible_os_family }}"
  when: ansible_os_family != "Debian"

- name: Upgrade repo info. # Run only if didn't run in the last hour.
  apt: update_cache=yes cache_valid_time=3600

- name: Install aptitude
  apt: name=aptitude state=present

- name: Upgrade packages
  apt: upgrade=full

- name: Change the hostname
  hostname: name={{ vm_name }}
  register: hostname_set

- name: Set the hostname in the /etc/host
  lineinfile: dest=/etc/hosts line='127.0.0.1 {{ vm_name }}'
  when: hostname_set.changed

- include: git.yml
- include: tools.yml

Check if the provisioning is running on a debian machine, fail otherwise
Check if the provisioning is running on a debian machine, fail otherwise
