- name: Check if "aptitude" is installed already
  shell: which aptitude
  ignore_errors: yes
  register: aptitude_check
  changed_when: aptitude_check.rc != 0

- name: install aptitude by hand if necessary
  sudo: yes
  when: aptitude_check|changed
  shell: apt-get install -y aptitude

- name: Make sure APT is up to date
  sudo: yes
  # cache for 12 hours
  apt: update_cache=yes upgrade=yes cache_valid_time=43200

- name: Install common packages on Debian
  sudo: yes
  apt : pkg={{ item }} state=installed
  with_items:
    - mosh
    - git
    - bash
    - bash-completion
    - locate


- name: Check if "aptitude" is installed already
  shell: which aptitude
  ignore_errors: yes
  register: aptitude_check
  changed_when: aptitude_check.rc != 0

- name: install aptitude by hand if necessary
  sudo: yes
  when: aptitude_check|changed
  shell: apt-get install -y aptitude

- name: Make sure APT is up to date
  sudo: yes
  # cache for 12 hours
  apt: update_cache=yes upgrade=yes cache_valid_time=43200

- name: Install common packages on Debian
  sudo: yes
  apt : pkg={{ item }} state=installed
  with_items:
    - mosh
    - git
    - mercurial
    - bash
    - bash-completion
    - locate


Include mercurial in the common Debian tasks
Include mercurial in the common Debian tasks
