]> git.phdru.name Git - ansible.git/blob - playbooks/debian/init-local-phd.yml
Refactor(init-local-phd): Split FUSE filesystems
[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', 'hibernate',
40           'pinentry-gtk2', # for GnuPG
41           'pptp-linux', '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', 'evince', 'fbreader', 'sqlite3-doc',
51           'vim-doc', 'vim-gtk3', # 'xpdf',
52           # FUSE filesystems
53           'fuse-convmvfs', 'curlftpfs', 'ntfs-3g', 'sshfs',
54           # Office docs
55           'catdoc', 'docx2txt', 'xlsx2csv', 'wv',
56           # LibreOffice/OpenOffice docs
57           'ods2tsv', 'odt2txt',
58           # Image handling
59           'imagemagick', 'imagemagick-doc',
60           'xli', 'xloadimage',
61           # Instant messaging
62           #'pidgin', 'pidgin-awayonlock', 'pidgin-encryption',
63           #'pidgin-extprefs', 'pidgin-mra', 'pidgin-openpgp', 'pidgin-otr',
64           #'pidgin-plugin-pack', 'pidgin-privacy-please', 'pidgin-skype',
65           # Video
66           'mpv',
67           # VirtualBox
68           'virtualbox-6.1',
69           # X Windows
70           'fvwm', 'gxmessage', 'rxvt-unicode',
71           'x11-apps', 'x11-xserver-utils', 'xbindkeys', 'xclip', 'xinit',
72           'xsel', 'xorg', 'xscreensaver', 'xserver-xorg',
73           'xserver-xorg-input-kbd', 'xserver-xorg-input-mouse',
74           'xserver-xorg-input-synaptics', 'xserver-xorg-legacy',
75           'xserver-xorg-video-vesa', 'xxkb',
76         ]
77         state: latest
78         update_cache: yes
79     - name: Mount cgroups
80       mount:
81         path: /sys/fs/cgroup
82         src: none
83         opts: memory
84         state: mounted
85         fstype: cgroup
86     - name: Mount webdav.yandex.ru
87       mount:
88         path: /mnt
89         src: https://webdav.yandex.ru
90         opts: noauto,user
91         state: present
92         fstype: davfs