]> git.phdru.name Git - ansible.git/blob - playbooks/debian/init-local-phd.yml
Feat(init-local-phd): Install VirtualBox
[ansible.git] / playbooks / debian / init-local-phd.yml
1 - name: Update local user phd
2   hosts: "{{ hosts | default('localhost') }}"
3   gather_facts: true
4   vars:
5     system_groups: root,adm,disk,cdrom,floppy,sudo,audio,www-data,video,plugdev,staff,users,Debian-exim,fuse,sambashare,bluetooth,davfs2,vboxusers,input
6   tasks:
7     - name: Create system groups
8       become: true
9       group:
10         name: "{{ item }}"
11         system: true
12       loop: "{{ system_groups.split(',') }}"
13     - name: Create group phd
14       become: true
15       group:
16         name: phd
17     - name: Create user phd
18       become: true
19       user:
20         name: phd
21         groups: "{{ system_groups }}"
22     - name: Prepare /etc/apt/sources to install VirtualBox
23       become: true
24       copy:
25         content: "deb http://download.virtualbox.org/virtualbox/debian {{ ansible_facts.distribution_release }} contrib non-free"
26         dest: /etc/apt/sources.list.d/virtualbox.list
27         owner: root
28         group: root
29         mode: 0640
30     - name: Install packages
31       become: true
32       apt:
33         autoclean: yes
34         autoremove: yes
35         cache_valid_time: 3600
36         install_recommends: no
37         name: [
38           # System
39           'acpi', 'fuse-convmvfs', 'curlftpfs', 'hibernate', 'ntfs-3g',
40           'pinentry-gtk2', # for GnuPG
41           'sshfs', 'uswsusp',
42           # Audio
43           'audacious', 'pavucontrol', 'pulseaudio',
44           # Bluetooth
45           'blueman', 'bluetooth', 'bluez-tools', 'pulseaudio-module-bluetooth',
46           # Browsers
47           'chromium',
48           'libdbus-1-3', # for Firefox
49           # Docs and texts
50           'docutils-doc', 'fbreader', 'qpdfview', 'sqlite3-doc',
51           'vim-doc', 'vim-gtk3',
52           # Image handling
53           'imagemagick', 'imagemagick-doc',
54           'xli', 'xloadimage',
55           # Instant messaging
56           #'pidgin', 'pidgin-awayonlock', 'pidgin-encryption',
57           #'pidgin-extprefs', 'pidgin-mra', 'pidgin-openpgp', 'pidgin-otr',
58           #'pidgin-plugin-pack', 'pidgin-privacy-please', 'pidgin-skype',
59           # Video
60           'mpv',
61           # VirtualBox
62           'virtualbox-6.1',
63           # X Windows
64           'fvwm', 'gxmessage', 'rxvt-unicode',
65           'x11-apps', 'x11-xserver-utils', 'xbindkeys', 'xclip', 'xinit',
66           'xsel', 'xorg', 'xscreensaver', 'xserver-xorg',
67           'xserver-xorg-input-kbd', 'xserver-xorg-input-mouse',
68           'xserver-xorg-input-synaptics', 'xserver-xorg-legacy',
69           'xserver-xorg-video-vesa', 'xxkb',
70         ]
71         state: latest
72         update_cache: yes
73     - name: Mount cgroups
74       mount:
75         path: /sys/fs/cgroup
76         src: none
77         opts: memory
78         state: mounted
79         fstype: cgroup
80     - name: Mount webdav.yandex.ru
81       mount:
82         path: /mnt
83         src: https://webdav.yandex.ru
84         opts: noauto,user
85         state: present
86         fstype: davfs