ansible-roles/ubuntu-deb-general/tasks/packages.yml

93 lines
2.5 KiB
YAML
Raw Normal View History

---
- 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 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 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: 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:
- wheezy-backports
- 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=installed
when: has_apt
with_items: common_packages
tags: [ 'packages', 'common_pkgs' ]
- name: Install the ntp server
apt: pkg=ntp state=installed
tags:
- packages
- ntp
- name: Ensure that the ntp server is running
service: name=ntp state=started
tags:
- packages
- ntp