forked from ISTI-ansible-roles/ansible-roles
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
---
|
|
- name: Install aptitude
|
|
apt: pkg=aptitude state=present cache_valid_time=1800
|
|
tags: packages
|
|
|
|
- name: Install the basic python packages. Not Trusty
|
|
apt: pkg={{ default_python_packages }} state=present cache_valid_time=1800
|
|
when:
|
|
- ansible_distribution == "Ubuntu"
|
|
- ansible_distribution_release != "trusty"
|
|
tags: packages
|
|
|
|
- name: Install the basic python packages on trusty
|
|
apt: pkg={{ default_python_packages_trusty }} state=present update_cache=yes cache_valid_time=1800
|
|
when:
|
|
- ansible_distribution == "Ubuntu"
|
|
- ansible_distribution_release == "trusty"
|
|
tags: packages
|
|
|
|
- name: Install software-properties-common if needed
|
|
apt: pkg=software-properties-common state=present update_cache=yes cache_valid_time=1800
|
|
when:
|
|
- ansible_distribution == "Ubuntu"
|
|
tags: packages
|
|
|
|
- name: Default the backports repository on debian 7
|
|
copy: src=backports-wheezy dest=/etc/apt/preferences.d/backports owner=root group=root mode=644
|
|
when: is_debian7 | bool
|
|
tags: wheezy-backports
|
|
|
|
- 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
|
|
when: is_debian7 | bool
|
|
tags: wheezy-backports
|
|
|
|
- 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
|
|
when: is_debian8 | bool
|
|
tags: jessie-backports
|
|
|
|
- name: install common packages
|
|
apt: pkg={{ common_packages }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
|
tags: [ 'packages', 'common_pkgs' ]
|
|
|
|
- name: Install additional packages, if any
|
|
apt: pkg={{ additional_packages | default([]) }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
|
tags: [ 'packages', 'common_pkgs', 'additional_packages' ]
|
|
|