--- - name: install iotop backport PPA copy: src=files/hardy-iotop-ppa dest=/etc/apt/sources.list.d/iotop-ppa.list when: is_hardy notify: apt update tags: - packages - name: GPG key for iotop backport PPA shell: apt-key list | grep -q 4B1E287796DD5C9A || gpg --keyserver keyserver.ubuntu.com --recv 4B1E287796DD5C9A; gpg --export --armor 4B1E287796DD5C9A | sudo apt-key add - when: is_hardy tags: - packages - name: Install the basic packages apt: pkg=python-software-properties state=installed when: has_apt tags: - packages - name: Install software-properties-common if needed apt: pkg=software-properties-common state=installed when: is_quantal tags: - packages - name: Install the backports repository on debian 6 apt_repository: repo='deb http://http.debian.net/debian-backports squeeze-backports main' state=present register: update_apt_cache when: is_debian6 tags: squeeze-backports - name: Install the backports repository on debian 7 apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main' state=present register: update_apt_cache when: is_debian7 tags: wheezy-backports - name: Default the backports repository on debian 7 copy: src=backports dest=/etc/apt/preferences.d owner=root group=root mode=644 register: update_apt_cache when: is_debian7 tags: Default-wheezy-backports - name: Install the backports repository on debian 8 apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present register: update_apt_cache when: is_debian8 tags: jessie-backports # Debian 7 “Wheezy” from February 2016 to May 2018 # Debian 8 “Jessie“ from May 2018 to April/May 2020 - name: Install the squeeze-lts repository on debian 6 apt_repository: repo='deb http://http.debian.net/debian squeeze-lts main contrib non-free' state=present register: update_apt_cache when: is_debian6 tags: squeeze-lts # - name: Install the wheezy-lts repository on debian 7 # apt_repository: repo='deb http://http.debian.net/debian wheezy-lts main contrib non-free' state=present # register: update_apt_cache # when: is_debian7 # tags: wheeze-lts - name: apt key for the internal ppa repository apt_key: url=http://ppa.research-infrastructures.eu/system/keys/system-archive.asc state=present when: is_ubuntu tags: packages - name: setup system apt repository apt_repository: repo='deb http://ppa.research-infrastructures.eu/system stable main' register: update_apt_cache when: is_ubuntu tags: packages - name: Update the apt cache apt: update_cache=yes when: update_apt_cache.changed ignore_errors: True tags: packages - name: install common packages apt: pkg={{ item }} state={{ pkg_state }} when: has_apt with_items: common_packages tags: [ 'packages', 'common_pkgs' ] - name: Install additional packages, if any apt: pkg={{ item }} state={{ pkg_state }} with_items: additional_packages when: additional_packages is defined tags: [ 'packages', 'common_pkgs', 'additional_packages' ]