-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTemplate-Packages-Debian.yml
49 lines (49 loc) · 1.81 KB
/
Template-Packages-Debian.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
- name: install backports (Debian 6)
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 6
apt_repository: repo='deb http://http.debian.net/debian-backports squeeze-backports main' state=present
- name: install backports (Debian 7)
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 7
apt_repository: repo='deb http://http.debian.net/debian wheezy-backports main' state=present
- name: install backports (Debian 8)
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 8
apt_repository: repo='deb http://http.debian.net/debian jessie-backports main' state=present
- name: install git ppa (Ubuntu 10.04)
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 10
apt_repository: repo='ppa:git-core/ppa' state=present
- name: install "core" packages (Debian)
when: ansible_os_family == "Debian"
apt: name={{ item }} state=latest update_cache=yes
with_items:
- vim
- screen
- tmux
- curl
- wget
- lynx
- links
- sudo
- git
- rsyslog
- rsync
- netcat
- nmap
- strace
- dnsutils
- iotop
- htop
- name: install latest hwe for Ubuntu 12.04
apt: name={{ item }} state=latest update_cache=yes
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 12
with_items:
- linux-generic-lts-trusty
- linux-image-generic-lts-trusty
- name: update system (Debian)
when: ansible_os_family == "Debian"
apt: upgrade=dist update_cache=yes
- name: set timezone to UTC (Debian)
when: ansible_os_family == "Debian"
shell: "echo 'Etc/UTC' > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata"
- name: cleanup old packages (Debian)
when: ansible_os_family == "Debian"
shell: "apt-get autoremove -y"