Install aptitude, fix some booleans, remove support for Debian 6.

This commit is contained in:
Andrea Dell'Amico 2019-10-29 18:11:15 +01:00
parent a7cffb1ffb
commit b1fc6439e0
1 changed files with 20 additions and 36 deletions

View File

@ -1,4 +1,8 @@
--- ---
- name: Install aptitude
apt: pkg=aptitude state=present cache_valid_time=1800
tags: packages
- name: Install the basic python packages - name: Install the basic python packages
apt: pkg={{ default_python_packages }} state=present update_cache=yes cache_valid_time=1800 apt: pkg={{ default_python_packages }} state=present update_cache=yes cache_valid_time=1800
when: not is_trusty when: not is_trusty
@ -6,94 +10,74 @@
- name: Install the basic python packages on trusty - name: Install the basic python packages on trusty
apt: pkg={{ default_python_packages_trusty }} state=present update_cache=yes cache_valid_time=1800 apt: pkg={{ default_python_packages_trusty }} state=present update_cache=yes cache_valid_time=1800
when: is_trusty when: is_trusty | bool
tags: packages tags: packages
- name: Install python-lxml on bionic - name: Install python-lxml on bionic
apt: pkg=python-lxml state=present update_cache=yes cache_valid_time=1800 apt: pkg=python-lxml state=present update_cache=yes cache_valid_time=1800
when: is_bionic when: is_bionic | bool
tags: packages tags: packages
- name: Install software-properties-common if needed - name: Install software-properties-common if needed
apt: pkg=software-properties-common state=present update_cache=yes cache_valid_time=1800 apt: pkg=software-properties-common state=present update_cache=yes cache_valid_time=1800
when: is_ubuntu when: is_ubuntu | bool
tags: packages tags: packages
- name: Default the backports repository on debian 6
copy: src=backports-squeeze dest=/etc/apt/preferences.d/backports owner=root group=root mode=644
when: is_debian6
tags: squeeze-backports
- name: Install the backports repository on debian 6
apt_repository: repo='deb http://http.debian.net/debian-backports squeeze-backports main' state=present update_cache=yes
when: is_debian6
tags: squeeze-backports
- name: Default the backports repository on debian 7 - name: Default the backports repository on debian 7
copy: src=backports-wheezy dest=/etc/apt/preferences.d/backports owner=root group=root mode=644 copy: src=backports-wheezy dest=/etc/apt/preferences.d/backports owner=root group=root mode=644
when: is_debian7 when: is_debian7 | bool
tags: wheezy-backports tags: wheezy-backports
- name: Install the backports repository on debian 7 - name: Install the backports repository on debian 7
apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main' state=present update_cache=yes apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main' state=present update_cache=yes
when: is_debian7 when: is_debian7 | bool
tags: wheezy-backports tags: wheezy-backports
- name: Install the backports repository on debian 8 - name: Install the backports repository on debian 8
apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present update_cache=yes apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present update_cache=yes
when: is_debian8 when: is_debian8 | bool
tags: jessie-backports 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 update_cache=yes
register: update_apt_cache
when: is_debian6
tags: squeeze-lts
- name: apt key for the internal ppa repository - name: apt key for the internal ppa repository
apt_key: url=http://ppa.research-infrastructures.eu/system/keys/system-archive.asc state=present apt_key: url=http://ppa.research-infrastructures.eu/system/keys/system-archive.asc state=present
when: when:
- is_ubuntu - is_ubuntu | bool
- egi_image is not defined or not egi_image - egi_image is not defined or not egi_image
- infrascience_internal_ppa - infrascience_internal_ppa | bool
ignore_errors: True ignore_errors: True
tags: packages tags: packages
- name: Remove the broken system apt repository - name: Remove the broken system apt repository
apt_repository: repo='deb http://ppa.research-infrastructures.eu/system stable main' state=absent apt_repository: repo='deb http://ppa.research-infrastructures.eu/system stable main' state=absent
when: is_ubuntu when: is_ubuntu | bool
ignore_errors: True
tags: packages tags: packages
- name: setup system apt repository - name: setup system apt repository
apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system stable main' update_cache=yes apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system stable main' update_cache=yes
when: when:
- is_ubuntu - is_ubuntu | bool
- infrascience_internal_ppa - infrascience_internal_ppa | bool
ignore_errors: True ignore_errors: True
tags: packages tags: packages
- name: Remove the broken system apt repository for specific distributions - name: Remove the broken system apt repository for specific distributions
apt_repository: repo='deb http://ppa.research-infrastructures.eu/system {{ ansible_distribution_release }} main' state=absent apt_repository: repo='deb http://ppa.research-infrastructures.eu/system {{ ansible_distribution_release }} main' state=absent
when: is_trusty when: is_trusty | bool
ignore_errors: True
tags: packages tags: packages
- name: setup system apt repository for specific distributions - name: setup system apt repository for specific distributions
apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system {{ ansible_distribution_release }} main' update_cache=yes apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system {{ ansible_distribution_release }} main' update_cache=yes
when: when:
- is_trusty - is_trusty | bool
- infrascience_internal_ppa - infrascience_internal_ppa | bool
ignore_errors: True ignore_errors: True
tags: packages tags: packages
- name: Setup the infrascience trusty repository - name: Setup the infrascience trusty repository
apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/trusty-infrascience {{ ansible_distribution_release }} main' update_cache=yes apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/trusty-infrascience {{ ansible_distribution_release }} main' update_cache=yes
when: when:
- is_trusty - is_trusty | bool
- infrascience_internal_ppa - infrascience_internal_ppa | bool
ignore_errors: True ignore_errors: True
tags: packages tags: packages