]> git.phdru.name Git - ansible.git/blob - playbooks/debian/init-local-phd.yml
d70d73956ca8bd5d841b7c47a2f8dc4f9117ac85
[ansible.git] / playbooks / debian / init-local-phd.yml
1 - name: Update local user phd
2   hosts: "{{ hosts | default('localhost') }}"
3   gather_facts: false
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', 'fuse-convmvfs', 'curlftpfs', 'hibernate', 'ntfs-3g',
32           'pinentry-gtk2', # for GnuPG
33           'sshfs', 'uswsusp',
34           # Audio
35           'audacious', 'pavucontrol', 'pulseaudio',
36           # Bluetooth
37           'blueman', 'bluetooth', 'bluez-tools', 'pulseaudio-module-bluetooth',
38           # Browsers
39           'chromium',
40           'libdbus-1-3', # for Firefox
41           # Docs and texts
42           'docutils-doc', 'fbreader', 'qpdfview', 'sqlite3-doc',
43           'vim-doc', 'vim-gtk3',
44           # Image handling
45           'imagemagick', 'imagemagick-doc',
46           'xli', 'xloadimage',
47           # Instant messaging
48           #'pidgin', 'pidgin-awayonlock', 'pidgin-encryption',
49           #'pidgin-extprefs', 'pidgin-mra', 'pidgin-openpgp', 'pidgin-otr',
50           #'pidgin-plugin-pack', 'pidgin-privacy-please', 'pidgin-skype',
51           # Video
52           'mpv',
53           # X Windows
54           'fvwm', 'gxmessage', 'rxvt-unicode',
55           'x11-apps', 'x11-xserver-utils', 'xbindkeys', 'xclip', 'xinit',
56           'xsel', 'xorg', 'xscreensaver', 'xserver-xorg',
57           'xserver-xorg-input-kbd', 'xserver-xorg-input-mouse',
58           'xserver-xorg-input-synaptics', 'xserver-xorg-legacy',
59           'xserver-xorg-video-vesa', 'xxkb',
60         ]
61         state: latest
62         update_cache: yes
63     - name: Mount cgroups
64       mount:
65         path: /sys/fs/cgroup
66         src: none
67         opts: memory
68         state: mounted
69         fstype: cgroup
70     - name: Mount webdav.yandex.ru
71       mount:
72         path: /mnt
73         src: https://webdav.yandex.ru
74         opts: noauto,user
75         state: present
76         fstype: davfs