diff --git a/roles/README.md b/roles/README.md new file mode 100644 index 0000000..3013d5d --- /dev/null +++ b/roles/README.md @@ -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. diff --git a/roles/linroom/files/99-wakeonlan.rules b/roles/linroom/files/99-wakeonlan.rules new file mode 100644 index 0000000..d4729ac --- /dev/null +++ b/roles/linroom/files/99-wakeonlan.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="net", NAME=="e*", RUN+="/usr/sbin/ethtool -s $name wol g" diff --git a/roles/linroom/handlers/main.yml b/roles/linroom/handlers/main.yml new file mode 100644 index 0000000..70c210e --- /dev/null +++ b/roles/linroom/handlers/main.yml @@ -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 '{}' ';' diff --git a/roles/linroom/tasks/fri_base.yml b/roles/linroom/tasks/fri_base.yml index 31d5566..a35bed4 100644 --- a/roles/linroom/tasks/fri_base.yml +++ b/roles/linroom/tasks/fri_base.yml @@ -101,10 +101,8 @@ - name: Set time to local RTC shell: "timedatectl set-local-rtc 1 --adjust-system-clock" -- name: Fix WoL on Intel - template: - src: intel-wol.rules - dest: /etc/udev/rules.d/79-wol.rules +- name: Enable Wake-on-LAN + import_tasks: wake-on-lan.yml - name: Join AD shell: "realm join --user=ad.join@FRI1.UNI-LJ.SI --computer-ou=OU=Ucilnice FRI1.UNI-LJ.SI" diff --git a/roles/linroom/tasks/vscode.yml b/roles/linroom/tasks/vscode.yml index da2c551..048c836 100644 --- a/roles/linroom/tasks/vscode.yml +++ b/roles/linroom/tasks/vscode.yml @@ -1,28 +1,26 @@ -- name: Add VS repository - block: - - name: VS repo - apt key - ansible.builtin.get_url: - url: https://packages.microsoft.com/keys/microsoft.asc - dest: /etc/apt/trusted.gpg.d/microsoft_key.asc - - name: VS repo - url - ansible.builtin.apt_repository: - repo: "deb https://packages.microsoft.com/repos/vscode stable main" - state: present +- name: Add VS repo key + apt_key: + url: https://packages.microsoft.com/keys/microsoft.asc + keyring: /etc/apt/trusted.gpg.d/microsoft.gpg + +- name: Add VS repo url + apt_repository: + repo: "deb https://packages.microsoft.com/repos/vscode stable main" - name: Install VSCode - ansible.builtin.apt: + apt: name: code state: latest - 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: - VisualStudioExptTeam.vscodeintellicode - arthurwang.vsc-prolog - dramforever.vscode-ghc-simple - eamodio.gitlens - justusadam.language-haskell - - ms-dotnettools.csharp + - ms-dotnettools.csdevkit # IS-63714 - ms-python.python - ms-vscode.cpptools - ocamllabs.ocaml-platform @@ -33,3 +31,4 @@ - marus25.cortex-debug # RA-63703 - NateAGeek.memory-viewer # RA-63703 - ms-vscode.cpptools-extension-pack # RA-63703 + notify: fix VS code extensions diff --git a/roles/linroom/tasks/wake-on-lan.yml b/roles/linroom/tasks/wake-on-lan.yml new file mode 100644 index 0000000..c648b58 --- /dev/null +++ b/roles/linroom/tasks/wake-on-lan.yml @@ -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 diff --git a/roles/linroom/templates/intel-wol.rules b/roles/linroom/templates/intel-wol.rules deleted file mode 100644 index 8baa58e..0000000 --- a/roles/linroom/templates/intel-wol.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="net", NAME=="e*", RUN+="/sbin/ethtool -s $name wol g" diff --git a/roles/winroom/tasks/minecraft-education.yml b/roles/winroom/tasks/minecraft-education.yml new file mode 100644 index 0000000..92b0dc3 --- /dev/null +++ b/roles/winroom/tasks/minecraft-education.yml @@ -0,0 +1,3 @@ +- name: Install Minecraft Education + win_chocolatey: + name: minecraft-education diff --git a/roles/winroom/tasks/vscode.yml b/roles/winroom/tasks/vscode.yml index 1d97ecb..63d0015 100644 --- a/roles/winroom/tasks/vscode.yml +++ b/roles/winroom/tasks/vscode.yml @@ -19,7 +19,7 @@ - dramforever.vscode-ghc-simple - eamodio.gitlens - justusadam.language-haskell - - ms-dotnettools.csharp + - ms-dotnettools.csdevkit # IS-63714 - ms-python.python - ms-vscode.cpptools - stonebuddha.vscode-better-sml