- name: Install ppa for latest git
  apt_repository: repo='ppa:git-core/ppa' state=present

- name: Apt autoremove unused dependencies
  # apt: autoremove=yes - won't be supported till ansible 2.1
  shell: apt-get autoremove

- name: Clean apt cache to recover some disk space
  shell: apt-get clean
  
- name: Update apt packages
  apt: update_cache=yes

- name: Update apt packages
  apt: update_cache=yes

- name: Install latest apt packages
  apt: upgrade=dist

- name: Install required system packages
  apt: pkg={{ item }} state=latest
  with_items:
    - git
    - screen
    - environment-modules
    # Make sure en_AU.UTF-8 and other en locales are installed 
    - language-pack-en

- name: Ensure apt version of ansible is uninstalled
  apt: pkg=ansible state=absent

- name: Ensure pip version of ansible is installed
  pip: name=ansible state=latest
  
- name: install some system packages
  apt: pkg="{{ item }}" state=latest
  with_items:
    - xauth
    - build-essential
    - curl
    - git
    - m4
    - ruby
    - texinfo
    - libbz2-dev
    - libcurl4-openssl-dev
    - libexpat-dev
    - libncurses-dev
    - zlib1g-dev
    - cpanminus
    - pandoc

- name: Install ppa for latest git
  apt_repository: repo='ppa:git-core/ppa' state=present

- name: Apt autoremove unused dependencies
  # apt: autoremove=yes - won't be supported till ansible 2.1
  shell: apt-get autoremove -y

- name: Clean apt cache to recover some disk space
  shell: apt-get clean
  
- name: Update apt packages
  apt: update_cache=yes

- name: Update apt packages
  apt: update_cache=yes

- name: Install latest apt packages
  apt: upgrade=dist

- name: Install required system packages
  apt: pkg={{ item }} state=latest
  with_items:
    - git
    - screen
    - environment-modules
    # Make sure en_AU.UTF-8 and other en locales are installed 
    - language-pack-en

- name: Ensure apt version of ansible is uninstalled
  apt: pkg=ansible state=absent

- name: Ensure pip version of ansible is installed
  pip: name=ansible state=latest
  
- name: install some system packages
  apt: pkg="{{ item }}" state=latest
  with_items:
    - xauth
    - build-essential
    - curl
    - git
    - m4
    - ruby
    - texinfo
    - libbz2-dev
    - libcurl4-openssl-dev
    - libexpat-dev
    - libncurses-dev
    - zlib1g-dev
    - cpanminus
    - pandoc

Remove prompt for apt autoremove
Remove prompt for apt autoremove
