2015-05-28 11:32:57 +02:00
|
|
|
---
|
|
|
|
- name: Install the basic packages
|
2018-04-18 15:37:41 +02:00
|
|
|
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
|
2017-02-22 18:18:10 +01:00
|
|
|
with_items: '{{ default_python_packages }}'
|
2015-11-27 20:06:45 +01:00
|
|
|
tags: packages
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install software-properties-common if needed
|
2018-04-18 15:37:41 +02:00
|
|
|
apt: pkg=software-properties-common state=installed update_cache=yes cache_valid_time=1800
|
2016-04-14 14:57:29 +02:00
|
|
|
when: is_ubuntu
|
2015-11-27 20:06:45 +01:00
|
|
|
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
|
2015-05-28 11:32:57 +02:00
|
|
|
|
|
|
|
- name: Install the backports repository on debian 6
|
2015-11-27 20:06:45 +01:00
|
|
|
apt_repository: repo='deb http://http.debian.net/debian-backports squeeze-backports main' state=present update_cache=yes
|
2015-05-28 11:32:57 +02:00
|
|
|
when: is_debian6
|
2015-07-31 16:31:09 +02:00
|
|
|
tags: squeeze-backports
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2015-11-27 20:06:45 +01:00
|
|
|
- name: Default the backports repository on debian 7
|
|
|
|
copy: src=backports-wheezy dest=/etc/apt/preferences.d/backports owner=root group=root mode=644
|
2015-05-28 11:32:57 +02:00
|
|
|
when: is_debian7
|
2015-07-31 16:31:09 +02:00
|
|
|
tags: wheezy-backports
|
|
|
|
|
2015-11-27 20:06:45 +01:00
|
|
|
- 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
|
2015-10-12 18:19:23 +02:00
|
|
|
when: is_debian7
|
2015-11-27 20:06:45 +01:00
|
|
|
tags: wheezy-backports
|
2015-10-12 18:19:23 +02:00
|
|
|
|
2015-06-14 23:39:13 +02:00
|
|
|
- name: Install the backports repository on debian 8
|
2015-11-27 20:06:45 +01:00
|
|
|
apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present update_cache=yes
|
2015-06-14 23:39:13 +02:00
|
|
|
when: is_debian8
|
2015-07-31 16:31:09 +02:00
|
|
|
tags: jessie-backports
|
2015-06-14 23:39:13 +02:00
|
|
|
|
2015-08-11 18:12:41 +02:00
|
|
|
# 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
|
2015-11-27 20:06:45 +01:00
|
|
|
apt_repository: repo='deb http://http.debian.net/debian squeeze-lts main contrib non-free' state=present update_cache=yes
|
2015-08-11 18:12:41 +02:00
|
|
|
register: update_apt_cache
|
|
|
|
when: is_debian6
|
|
|
|
tags: squeeze-lts
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: apt key for the internal ppa repository
|
|
|
|
apt_key: url=http://ppa.research-infrastructures.eu/system/keys/system-archive.asc state=present
|
2016-11-22 17:21:49 +01:00
|
|
|
when:
|
|
|
|
- is_ubuntu
|
|
|
|
- egi_image is not defined or not egi_image
|
2017-07-21 11:08:34 +02:00
|
|
|
- infrascience_internal_ppa
|
2015-11-08 21:56:27 +01:00
|
|
|
ignore_errors: True
|
2015-07-31 16:31:09 +02:00
|
|
|
tags: packages
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2017-03-17 15:20:23 +01:00
|
|
|
- name: Remove the broken system apt repository
|
|
|
|
apt_repository: repo='deb http://ppa.research-infrastructures.eu/system stable main' state=absent
|
|
|
|
when: is_ubuntu
|
|
|
|
ignore_errors: True
|
|
|
|
tags: packages
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: setup system apt repository
|
2017-03-17 15:20:23 +01:00
|
|
|
apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system stable main' update_cache=yes
|
2017-07-21 11:08:34 +02:00
|
|
|
when:
|
|
|
|
- is_ubuntu
|
|
|
|
- infrascience_internal_ppa
|
2015-05-28 11:32:57 +02:00
|
|
|
ignore_errors: True
|
2015-07-28 19:27:25 +02:00
|
|
|
tags: packages
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2017-03-17 15:20:23 +01:00
|
|
|
- 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
|
|
|
|
when: is_trusty
|
|
|
|
ignore_errors: True
|
|
|
|
tags: packages
|
|
|
|
|
2016-09-07 17:23:51 +02:00
|
|
|
- name: setup system apt repository for specific distributions
|
2017-03-17 15:20:23 +01:00
|
|
|
apt_repository: repo='deb [arch=amd64] http://ppa.research-infrastructures.eu/system {{ ansible_distribution_release }} main' update_cache=yes
|
2017-07-21 11:08:34 +02:00
|
|
|
when:
|
|
|
|
- is_trusty
|
|
|
|
- infrascience_internal_ppa
|
2016-09-07 17:23:51 +02:00
|
|
|
ignore_errors: True
|
|
|
|
tags: packages
|
|
|
|
|
2018-04-04 20:21:09 +02:00
|
|
|
- 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
|
|
|
|
when:
|
|
|
|
- is_trusty
|
|
|
|
- infrascience_internal_ppa
|
|
|
|
ignore_errors: True
|
|
|
|
tags: packages
|
|
|
|
|
2015-05-28 11:32:57 +02:00
|
|
|
- name: install common packages
|
2018-04-18 15:37:41 +02:00
|
|
|
apt: pkg={{ item }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
2016-03-02 15:54:10 +01:00
|
|
|
with_items: '{{ common_packages }}'
|
2015-07-24 12:46:24 +02:00
|
|
|
tags: [ 'packages', 'common_pkgs' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|
2015-07-28 19:27:25 +02:00
|
|
|
- name: Install additional packages, if any
|
2018-04-18 15:37:41 +02:00
|
|
|
apt: pkg={{ item }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
2016-03-07 17:43:37 +01:00
|
|
|
with_items: '{{ additional_packages | default([]) }}'
|
2015-07-31 16:31:09 +02:00
|
|
|
tags: [ 'packages', 'common_pkgs', 'additional_packages' ]
|
2015-05-28 11:32:57 +02:00
|
|
|
|