]> git.phdru.name Git - ansible.git/blob - playbooks/debian/init-local-phd.yaml
914eeecc125009f2f190a4a5b585e5ef983a5538
[ansible.git] / playbooks / debian / init-local-phd.yaml
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: Install packages
23       become: true
24       apt:
25         autoclean: yes
26         autoremove: yes
27         cache_valid_time: 3600
28         install_recommends: no
29         name: [
30           # System
31           'acpi', 'cgroupfs-mount', 'ifplugd',
32           'pinentry-gtk2', # for GnuPG
33           'pm-utils',
34           # I no longer works in NRSC, I don't use PPTP VPNs
35           #'pptp-linux',
36           # Audio
37           'deadbeef', 'pavucontrol', 'pulseaudio',
38           # Bluetooth
39           #'blueman',
40           'bluetooth', 'bluez-tools', 'pulseaudio-module-bluetooth',
41           # Browsers
42           'chromium',
43           'libdbus-1-3', # for Firefox
44           # Docs and texts
45           'docutils-doc', 'evince', 'fbreader', 'sqlite3-doc',
46           'vim-doc', 'vim-gtk3', # 'xpdf',
47           # FUSE filesystems
48           'fuse-convmvfs', 'curlftpfs', 'jmtpfs', 'ntfs-3g', 'sshfs',
49           # Office docs
50           'catdoc', 'docx2txt', 'xlsx2csv', 'wv',
51           # LibreOffice/OpenOffice docs
52           'ods2tsv', 'odt2txt',
53           # Image handling
54           'imagemagick', 'imagemagick-doc',
55           'xli', 'xloadimage',
56           # Instant messaging
57           #'pidgin', 'pidgin-awayonlock', 'pidgin-encryption',
58           #'pidgin-extprefs', 'pidgin-mra', 'pidgin-openpgp', 'pidgin-otr',
59           #'pidgin-plugin-pack', 'pidgin-privacy-please', 'pidgin-skype',
60           # Video
61           'mpv',
62           # Virtual machines
63           'qemu',
64           # X Windows
65           'fvwm', 'gxmessage', 'rxvt-unicode',
66           'x11-apps', 'x11-xserver-utils', 'xbindkeys', 'xclip', 'xinit',
67           'xsel', 'xorg', 'xserver-xorg',
68           'xserver-xorg-input-kbd', 'xserver-xorg-input-mouse',
69           'xserver-xorg-input-synaptics', 'xserver-xorg-legacy',
70           'xserver-xorg-video-vesa', 'xxkb',
71           # XScreenSaver
72           'xscreensaver', 'xscreensaver-data-extra', 'xscreensaver-gl',
73           'xscreensaver-gl-extra', 'xdaliclock', 'xfishtank',
74           'xmountains', 'xplanet', 'xplanet-images', 'xsnow',
75         ]
76         state: latest
77         update_cache: yes
78     - name: Mount webdav.yandex.ru
79       mount:
80         path: /mnt
81         src: https://webdav.yandex.ru
82         opts: noauto,user
83         state: present
84         fstype: davfs