]> git.phdru.name Git - ansible.git/blob - playbooks/debian/roles/init-system/tasks/main.yml
Feat(debian/init-system): Install more packages
[ansible.git] / playbooks / debian / roles / init-system / tasks / main.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', 'aptitude', 'deborphan', 'dselect',
17            'bash', 'bash-completion',
18            'curl', 'mc', 'rsync', 'vim', 'wget',
19            'arj', 'bzip2', 'lzip', 'lzma', 'lzop', 'p7zip',
20            'unzip', 'zip', 'xz-utils',
21            'gnupg', 'gnupg2',
22            'adjtimex', 'logcheck',
23            'bsd-mailx', 'mutt', 'procmail',
24            'python', 'python2.7', 'python3',
25           ]
26     purge: yes
27     state: latest
28     update_cache: yes
29
30 - name: Configure apt key for deb-multimedia
31   become: true
32   apt_key:
33     keyserver: keyserver.ubuntu.com
34     id: 5C808C2B65558117
35   when: "inventory_hostname in ('localhost', 'iskra-aviel.phdru.name')"
36
37 - name: Check locales
38   shell: "grep -c '^ru_RU.KOI8-R' /etc/locale.gen || :"
39   register: has_locales
40 - debug:
41     msg: "Creating and regenerating locales..."
42   changed_when: true # Force notification
43   notify: Configure locales
44   when: has_locales.stdout == "0"