Merge branch 'master' of gitlab.fri.uni-lj.si:timotej/classroom

This commit is contained in:
polz 2023-09-07 20:53:51 +02:00
commit a39891fa0b
9 changed files with 56 additions and 19 deletions

25
roles/README.md Normal file
View file

@ -0,0 +1,25 @@
# Recepti za nameščanje programske opreme
Recepti za nameščanje programske opreme v učilnicah FRI se nahajajo v:
- linroom/tasks za GNU/Linux
- windows/tasks za Microsoft Windows
Vsako leto predvidoma popravimo recepte - sezname potrebnih programov in recepte za nameščanje le-teh.
## Zahteve za predmet
V imeniku tasks za vsak predmet obstaja YAML datoteka s seznamom zahtevanih programov.
Na primer, za predmet Komunikacijski protokoli in omrežna varnost obstaja datoteka KPOV-63716.yml.
V datoteki je po ena vrstica z besedo "include" za vsak program, ki ga pri predmetu potrebujemo.
Trenutno za vsak predmet obstajata po dve datoteki - ena pod linroom/tasks, druga pod winroom/tasks.
## Nameščanje posameznega programa
Datoteke za nameščanje programov se prav tako nahajajo v imeniku tasks.
Na primer, za nameščanje Microsoftovega VSCode, obstaja datoteka vscode.yml.
Za nameščanje pod GNU/Linux in Windows sta datoteki seveda različni.
Ker nekateri programi niso javno dostopni, se pri nekaterih receptih uporabljajo datoteke z datotečnega strežnika UcilniceSMB. Kako to popraviti, je zaenkrat odprto vprašanje.

View file

@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="net", NAME=="e*", RUN+="/usr/sbin/ethtool -s $name wol g"

View file

@ -0,0 +1,4 @@
# Mark everything in bin/ directories executable. Some extensions do
# this on activation, but non-root users don’t have permission for it.
- name: fix VS code extensions
command: find /usr/share/code/resources/app -name bin -exec chmod -R +x '{}' ';'

View file

@ -101,10 +101,8 @@
- name: Set time to local RTC - name: Set time to local RTC
shell: "timedatectl set-local-rtc 1 --adjust-system-clock" shell: "timedatectl set-local-rtc 1 --adjust-system-clock"
- name: Fix WoL on Intel - name: Enable Wake-on-LAN
template: import_tasks: wake-on-lan.yml
src: intel-wol.rules
dest: /etc/udev/rules.d/79-wol.rules
- name: Join AD - name: Join AD
shell: "realm join --user=ad.join@FRI1.UNI-LJ.SI --computer-ou=OU=Ucilnice FRI1.UNI-LJ.SI" shell: "realm join --user=ad.join@FRI1.UNI-LJ.SI --computer-ou=OU=Ucilnice FRI1.UNI-LJ.SI"

View file

@ -1,28 +1,26 @@
- name: Add VS repository - name: Add VS repo key
block: apt_key:
- name: VS repo - apt key url: https://packages.microsoft.com/keys/microsoft.asc
ansible.builtin.get_url: keyring: /etc/apt/trusted.gpg.d/microsoft.gpg
url: https://packages.microsoft.com/keys/microsoft.asc
dest: /etc/apt/trusted.gpg.d/microsoft_key.asc - name: Add VS repo url
- name: VS repo - url apt_repository:
ansible.builtin.apt_repository: repo: "deb https://packages.microsoft.com/repos/vscode stable main"
repo: "deb https://packages.microsoft.com/repos/vscode stable main"
state: present
- name: Install VSCode - name: Install VSCode
ansible.builtin.apt: apt:
name: code name: code
state: latest state: latest
- name: Install VS Code extensions - name: Install VS Code extensions
shell: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension "{{ item }}" command: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension "{{ item }}"
loop: loop:
- VisualStudioExptTeam.vscodeintellicode - VisualStudioExptTeam.vscodeintellicode
- arthurwang.vsc-prolog - arthurwang.vsc-prolog
- dramforever.vscode-ghc-simple - dramforever.vscode-ghc-simple
- eamodio.gitlens - eamodio.gitlens
- justusadam.language-haskell - justusadam.language-haskell
- ms-dotnettools.csharp - ms-dotnettools.csdevkit # IS-63714
- ms-python.python - ms-python.python
- ms-vscode.cpptools - ms-vscode.cpptools
- ocamllabs.ocaml-platform - ocamllabs.ocaml-platform
@ -33,3 +31,4 @@
- marus25.cortex-debug # RA-63703 - marus25.cortex-debug # RA-63703
- NateAGeek.memory-viewer # RA-63703 - NateAGeek.memory-viewer # RA-63703
- ms-vscode.cpptools-extension-pack # RA-63703 - ms-vscode.cpptools-extension-pack # RA-63703
notify: fix VS code extensions

View file

@ -0,0 +1,8 @@
- name: Install ethtool
apt:
name: ethtool
- name: Add udev rule to enable wake-on-lan for ethernet interfaces
copy:
dest: /etc/udev/rules.d/
src: 99-wakeonlan.rules

View file

@ -1 +0,0 @@
ACTION=="add", SUBSYSTEM=="net", NAME=="e*", RUN+="/sbin/ethtool -s $name wol g"

View file

@ -0,0 +1,3 @@
- name: Install Minecraft Education
win_chocolatey:
name: minecraft-education

View file

@ -19,7 +19,7 @@
- dramforever.vscode-ghc-simple - dramforever.vscode-ghc-simple
- eamodio.gitlens - eamodio.gitlens
- justusadam.language-haskell - justusadam.language-haskell
- ms-dotnettools.csharp - ms-dotnettools.csdevkit # IS-63714
- ms-python.python - ms-python.python
- ms-vscode.cpptools - ms-vscode.cpptools
- stonebuddha.vscode-better-sml - stonebuddha.vscode-better-sml