summaryrefslogtreecommitdiff
path: root/roles/ws/base/tasks/main.yml
blob: 23067abddc8c9c90e15d12c92b684538a77fdb53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
- name: create zfs dataset for /home
  when: ws_base_home_zfs is defined
  zfs:
    name: "{{ ws_base_home_zfs.pool }}/{{ ws_base_home_zfs.name }}"
    state: present
    extra_zfs_properties: "{{ ws_base_home_zfs.properties | default({}) | combine({'mountpoint': '/home'}) | dehumanize_zfs_properties }}"

- name: hide ntfs disks
  when: ws_base_hide_ntfs_disks is defined
  import_tasks: hide-ntfs-disks.yml

- name: configure cleanup of /tmp
  when: ws_base_cleanup_tmp is defined
  copy:
    dest: /etc/tmpfiles.d/00_tmp-override.conf
    content: |
      d /tmp/ 1777 root root {{ ws_base_cleanup_tmp }}

- name: reset cleanup of /tmp to default
  when: ws_base_cleanup_tmp is not defined
  file:
    path: /etc/tmpfiles.d/00_tmp-override.conf
    state: absent


- name: prohibited packages
  loop:
  - flashplugin-installer
  template:
    src: prohibited-package.j2
    dest: "/etc/apt/preferences.d/{{ item }}.disabled"

- name: base packages
  apt:
    name:
    - pwgen
    - p7zip-rar
    - ntfs-3g
    - pass
    - evince
    - geeqie
    - file-roller
    - cifs-utils
    state: present

- name: install exfat packages for legacy installs
  when: (ansible_distribution == 'Debian' and (ansible_distribution_major_version | int) < 11) or (ansible_distribution == 'Ubuntu' and (ansible_distribution_major_version | int) < 22)
  apt:
    name:
    - exfat-fuse
    - exfat-utils
    state: present

- name: install exfat packages for new installs
  when: (ansible_distribution == 'Debian' and (ansible_distribution_major_version | int) >= 11) or (ansible_distribution == 'Ubuntu' and (ansible_distribution_major_version | int) >= 22)
  apt:
    name:
    - exfatprogs
    state: present

- name: install chromium and firefox via snap
  snap:
    name:
    - firefox
    - chromium
    state: present

- name: install multimedia stuff
  apt:
    name:
    - vlc
    - mpv
    - ffmpeg
    - pavumeter
    - pulsemixer
    - lame
    - gstreamer1.0-pulseaudio
    state: present

- name: install restricted stuff
  apt:
    name:
    - ubuntu-restricted-extras
    - chromium-codecs-ffmpeg-extra
    state: present

- name: remove superflous packages
  apt:
    name: "{{ ws_base_superflous_packages }}"
    state: absent
    autoremove: yes
    purge: yes

- name: remove netplan config for network-manager
  when: "'network-manager' in ws_base_superflous_packages"
  file:
    name: /etc/netplan/01-network-manager-all.yaml
    state: absent


- name: install extra packages
  apt:
    name: "{{ ws_base_extra_packages }}"
    state: present

- name: install extra snaps
  snap:
    name: "{{ ws_base_extra_snaps }}"
    state: present

- name: configure lightdm
  import_tasks: lightdm.yml