]> git.phdru.name Git - ansible.git/blob - playbooks/roles/init-system/tasks/apt.yml
Feat(init-system): Always update `/etc/apt/sources.list`
[ansible.git] / playbooks / roles / init-system / tasks / apt.yml
1 - name: Configure apt
2   become: true
3   template:
4     src: sources.list
5     dest: /etc/apt/sources.list
6     owner: root
7     group: root
8     mode: '0640'
9
10 - name: Install minimal software packages
11   become: true
12   apt:
13     autoclean: yes
14     autoremove: yes
15     install_recommends: no
16     name: ['apt', 'apt-transport-https', 'aptitude',
17            'bash', 'bash-completion', 'bzip2',
18            'curl', 'deborphan', 'dnsutils', 'dselect', 'ifupdown-extra',
19            'gnupg', 'gnupg2', 'logcheck', 'mc', 'mutt',
20            'procmail', 'rsync', 'unzip', 'vim', 'wget', 'whois', 'zip',
21           ]
22     state: latest
23     update_cache: yes
24
25 - name: Purge uninteresting packages
26   become: true
27   apt:
28     autoclean: yes
29     autoremove: yes
30     cache_valid_time: 3600
31     install_recommends: no
32     name: ['avahi-autoip', 'bluetooth', 'bluez',
33            'debian-faq', 'doc-debian',
34            'emacsen-comm', 'vim-tiny',
35           ]
36     purge: yes
37     state: absent
38     update_cache: no
39
40 - name: Configure apt key for deb-multimedia
41   become: true
42   apt_key:
43     keyserver: keyserver.ubuntu.com
44     id: 5C808C2B65558117
45   when: "inventory_hostname in ('localhost', 'iskra-aviel.phdru.name')"