-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautoinstall.yaml
64 lines (57 loc) · 2.85 KB
/
autoinstall.yaml
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
#cloud-config
autoinstall:
version: 1
user-data:
users: [""]
disable_root: false
ssh:
install-server: no
storage:
layout:
name: lvm
password: ubuntu # Change this to your desired password
keyboard:
layout: de
locale: en_US
packages:
- curl
- wget
snaps: # Install apps from this catalog: https://snapcraft.io/store
- name: code
- name: postman
- name: powershell
- name: pycharm-community
late-commands:
# Update packages
- curtin in-target --target=/target -- apt-get update
- curtin in-target --target=/target -- apt-get upgrade -y
# Install Microsoft Intune Portal
- curtin in-target --target=/target -- mkdir -p /tmp/microsoft
- curtin in-target --target=/target -- sh -c 'cd /tmp/microsoft && curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg'
- curtin in-target --target=/target -- install -o root -g root -m 644 /tmp/microsoft/microsoft.gpg /usr/share/keyrings/microsoft.gpg
- curtin in-target --target=/target -- sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/24.04/prod noble main" > /etc/apt/sources.list.d/microsoft-ubuntu-noble-prod.list'
- curtin in-target --target=/target -- apt-get update
- curtin in-target --target=/target -- apt-get install -y intune-portal
# Install MDE
- curtin in-target --target=/target -- wget -O /tmp/microsoft/mde_installer.sh https://raw.githubusercontent.com/microsoft/mdatp-xplat/refs/heads/master/linux/installation/mde_installer.sh
- curtin in-target --target=/target -- chmod +x /tmp/microsoft/mde_installer.sh
- curtin in-target --target=/target -- /tmp/microsoft/mde_installer.sh --install --channel prod -y
# Initialize MDE service
- curtin in-target --target=/target -- systemctl daemon-reload
- curtin in-target --target=/target -- systemctl enable mdatp
- curtin in-target --target=/target -- systemctl start mdatp
# Install Microsoft Edge
- curtin in-target --target=/target -- add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main"
- curtin in-target --target=/target -- apt-get update
- curtin in-target --target=/target -- apt-get install -y microsoft-edge-stable
# Remove bloatware
- curtin in-target --target=/target -- apt-get purge -y libreoffice-common
- curtin in-target --target=/target -- apt-get purge -y libreoffice*
- curtin in-target --target=/target -- apt-get purge -y remmina*
- curtin in-target --target=/target -- apt-get purge -y transmission*
# Clean up
- curtin in-target --target=/target -- apt-get autoremove -y
- curtin in-target --target=/target -- apt-get clean
- curtin in-target --target=/target -- rm -rf /tmp/microsoft
# Reboot
- curtin in-target --target=/target -- reboot