From 5954f4e3ba5f1a22d3f96d9a44cca5a3f50711e6 Mon Sep 17 00:00:00 2001 From: RR Date: Sun, 17 Aug 2025 20:58:52 +0200 Subject: [PATCH 01/66] Minor fixes for deprecated and new packages --- roles/stm32algobuilder/tasks/main_win.yml | 57 +++++++++++----------- roles/stm32mems-studio/tasks/main_lin.yml | 4 +- roles/stm32unicleogui/tasks/main_win.yml | 58 ++++++++++++----------- 3 files changed, 63 insertions(+), 56 deletions(-) diff --git a/roles/stm32algobuilder/tasks/main_win.yml b/roles/stm32algobuilder/tasks/main_win.yml index ff0e92e..c707e81 100644 --- a/roles/stm32algobuilder/tasks/main_win.yml +++ b/roles/stm32algobuilder/tasks/main_win.yml @@ -1,31 +1,34 @@ -# TODO check install status +# Deprecated - replace by mems-studio +- name: Do not install AlgoBuilder + debug: + msg: "Do not install AlgoBuilder on Windows - deprecated" # TODO: Exe file is missing - Problem on ST site -- name: Check AlgoBuilder install status - win_stat: - path: C:\Program Files (x86)\Thonny\thonny.exe - register: file +# - name: Check AlgoBuilder install status +# win_stat: +# path: C:\Program Files (x86)\Thonny\thonny.exe +# register: file -- when: not file.stat.exists - block: - - name: Download AlgoBuilder - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EdBQJN3I6fVFj7qgs6SjRp4BZ0QbWIV26NUlLv_4d9JsDQ?e=hA4Cbl&download=1" -O C:\AlgoBuilderSuite.exe - args: - creates: C:\AlgoBuilderSuite.exe - #win_get_url: - # follow_redirects: all - # http_agent: Wget/1.21.3 - # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EdBQJN3I6fVFj7qgs6SjRp4BZ0QbWIV26NUlLv_4d9JsDQ?e=hA4Cbl?download=1 - # dest: C:\AlgoBuilderSuite.exe - #register: download +# - when: not file.stat.exists +# block: +# - name: Download AlgoBuilder +# win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EdBQJN3I6fVFj7qgs6SjRp4BZ0QbWIV26NUlLv_4d9JsDQ?e=hA4Cbl&download=1" -O C:\AlgoBuilderSuite.exe +# args: +# creates: C:\AlgoBuilderSuite.exe +# #win_get_url: +# # follow_redirects: all +# # http_agent: Wget/1.21.3 +# # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EdBQJN3I6fVFj7qgs6SjRp4BZ0QbWIV26NUlLv_4d9JsDQ?e=hA4Cbl?download=1 +# # dest: C:\AlgoBuilderSuite.exe +# #register: download - - name: Install AlgoBuilder - win_package: - path: C:\AlgoBuilderSuite.exe - # path: "{{ download.dest }}" - arguments: /Verysilent /AllUsers +# - name: Install AlgoBuilder +# win_package: +# path: C:\AlgoBuilderSuite.exe +# # path: "{{ download.dest }}" +# arguments: /Verysilent /AllUsers - - name: Remove temporary files - win_file: - path: C:\AlgoBuilderSuite.exe - # path: "{{ download.dest }}" - state: absent +# - name: Remove temporary files +# win_file: +# path: C:\AlgoBuilderSuite.exe +# # path: "{{ download.dest }}" +# state: absent diff --git a/roles/stm32mems-studio/tasks/main_lin.yml b/roles/stm32mems-studio/tasks/main_lin.yml index fccdf44..0fd3d99 100644 --- a/roles/stm32mems-studio/tasks/main_lin.yml +++ b/roles/stm32mems-studio/tasks/main_lin.yml @@ -1,4 +1,4 @@ -- name: Do not install UnicleoGUI +- name: Do not install mems-studio debug: - msg: "Do not install UnicleoGUI on Linux" + msg: "Do not install mems-studio on Linux" diff --git a/roles/stm32unicleogui/tasks/main_win.yml b/roles/stm32unicleogui/tasks/main_win.yml index 5397607..b40d13c 100644 --- a/roles/stm32unicleogui/tasks/main_win.yml +++ b/roles/stm32unicleogui/tasks/main_win.yml @@ -1,31 +1,35 @@ -# TODO check install status -- name: Check UnicleoGUI install status - win_stat: - path: C:\Program Files (x86)\STMicroelectronics\Unicleo-GUI\Unicleo-GUI.exe - register: file -- when: not file.stat.exists - block: - - name: Download UnicleoGUI - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EQG4vStF7ApBsN2TDm5AjGQBiU0iFbZZiz91UqGeHKX9FA?e=QOQky2&download=1" -O C:\Unicleo-GUI_Setup.exe - args: - creates: C:\Unicleo-GUI_Setup.exe - #win_get_url: - # follow_redirects: all - # http_agent: Wget/1.21.3 - # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EQG4vStF7ApBsN2TDm5AjGQBiU0iFbZZiz91UqGeHKX9FA?e=QOQky2?download=1 - # dest: C:\Unicleo-GUI_Setup.exe - #register: download +# Deprecated - replace by mems-studio +- name: Do not install UnicleoGUI + debug: + msg: "Do not install UnicleoGUI on Windows - deprecated" +# # TODO check install status +# - name: Check UnicleoGUI install status +# win_stat: +# path: C:\Program Files (x86)\STMicroelectronics\Unicleo-GUI\Unicleo-GUI.exe +# register: file +# - when: not file.stat.exists +# block: +# - name: Download UnicleoGUI +# win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EQG4vStF7ApBsN2TDm5AjGQBiU0iFbZZiz91UqGeHKX9FA?e=QOQky2&download=1" -O C:\Unicleo-GUI_Setup.exe +# args: +# creates: C:\Unicleo-GUI_Setup.exe +# #win_get_url: +# # follow_redirects: all +# # http_agent: Wget/1.21.3 +# # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EQG4vStF7ApBsN2TDm5AjGQBiU0iFbZZiz91UqGeHKX9FA?e=QOQky2?download=1 +# # dest: C:\Unicleo-GUI_Setup.exe +# #register: download - - name: Install UnicleoGUI - win_package: - path: C:\Unicleo-GUI_Setup.exe - # path: "{{ download.dest }}" - arguments: /Verysilent /AllUsers +# - name: Install UnicleoGUI +# win_package: +# path: C:\Unicleo-GUI_Setup.exe +# # path: "{{ download.dest }}" +# arguments: /Verysilent /AllUsers - - name: Remove temporary files - win_file: - path: C:\Unicleo-GUI_Setup.exe - # path: "{{ download.dest }}" - state: absent +# - name: Remove temporary files +# win_file: +# path: C:\Unicleo-GUI_Setup.exe +# # path: "{{ download.dest }}" +# state: absent From e2b92f7a311be3da628e8386eb0772bfa23452d0 Mon Sep 17 00:00:00 2001 From: RR Date: Sun, 17 Aug 2025 21:21:37 +0200 Subject: [PATCH 02/66] refreshing stm32 tools (Cubeide, programmer, monitor) --- roles/stm32cube/tasks/main_lin.yml | 6 +-- roles/stm32cube/tasks/main_win.yml | 68 +++++++++++++++--------------- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/roles/stm32cube/tasks/main_lin.yml b/roles/stm32cube/tasks/main_lin.yml index 01ba7fc..085ffca 100644 --- a/roles/stm32cube/tasks/main_lin.yml +++ b/roles/stm32cube/tasks/main_lin.yml @@ -8,13 +8,13 @@ # register: download - name: Set filename set_fact: - dest_fname: /tmp/st-stm32cubeide_1.16.0_21983_20240628_1741_amd64.sh + dest_fname: /tmp/st-stm32cubeide_1.19.0_25607_20250703_0907_amd64.sh - name: Download stm32 command: - cmd: wget 'https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EUrIkoWbod5OilNHLnReBvYBMK7mlwI-R1Qeqhb-ux7hjg?e=HGloHF&download=1' -O {{ dest_fname }} + cmd: wget 'https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERLZDFSgbO1Hm6TT9CLhyUIBZS-4anic7RWtvQliqN-thA?e=KZq4VJ' -O {{ dest_fname }} creates: "{{ dest_fname }} " - # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EUrIkoWbod5OilNHLnReBvYBMK7mlwI-R1Qeqhb-ux7hjg?e=HGloHF?download=1 + # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERLZDFSgbO1Hm6TT9CLhyUIBZS-4anic7RWtvQliqN-thA?e=KZq4VJ - name: Change script permissions file: diff --git a/roles/stm32cube/tasks/main_win.yml b/roles/stm32cube/tasks/main_win.yml index 752db87..6421854 100644 --- a/roles/stm32cube/tasks/main_win.yml +++ b/roles/stm32cube/tasks/main_win.yml @@ -7,18 +7,18 @@ block: - name: Set download filenames set_fact: - cubemx_download_file: C:\CubeMX.exe + # cubemx_download_file: C:\CubeMX.exe not needed separately cubeprogrammer_download_file: C:\CubeProgrammer.exe cubemonitor_download_file: C:\CubeMonitor.exe cufinder_download_file: C:\CUFinder.exe - cubeide_download_file: C:\st-stm32cubeide_1.16.0_21983_20240628_1741_x86_64.exe - - name: Download CubeMX - # # win_get_url: - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZhqHxJoAfdEjdlMu0uGWGcBOqrT0vTVv2_nhynWZ3fOwQ?e=ilAlzP&download=1" -O "{{ cubemx_download_file }}" - # #dest: C:\CubeMX.exe - # #register: cubemx_download - args: - creates: "{{ cubemx_download_file }}" + cubeide_download_file: C:\st-stm32cubeide_1.19.0_25607_20250703_0907_x86_64.exe + # - name: Download CubeMX + # # # win_get_url: + # win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZhqHxJoAfdEjdlMu0uGWGcBOqrT0vTVv2_nhynWZ3fOwQ?e=ilAlzP&download=1" -O "{{ cubemx_download_file }}" + # # #dest: C:\CubeMX.exe + # # #register: cubemx_download + # args: + # creates: "{{ cubemx_download_file }}" #- name: Install CubeMX # win_package: @@ -26,7 +26,7 @@ # arguments: /S - name: Download CubeProgrammer - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXHsKDjM6hVAuEGwEWcMyBEB6bHd3HuOP38D7Wjt41vjTw?e=7jatnu&download=1" -O "{{ cubeprogrammer_download_file }}" + win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXHsKDjM6hVAuEGwEWcMyBEBgx7D9i_M3QAkhpe9RR9zPQ?e=VcUvvu" -O "{{ cubeprogrammer_download_file }}" #win_get_url: # dest: C:\CubeProgrammer.exe #register: cubeprogrammer_download @@ -39,10 +39,10 @@ arguments: /S - name: Download CubeMonitor - # TODO 2024: only zip distributions exists in zip file - # TODO 2024: URL: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERUUr7knYFNNuv5rViOb-PgB596EvC3ev4P_Aa_MjRL57Q?e=tZssk4 - # TODO 2024: Have extracted setup exe - not sure if this is enough! - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EQnm_b359Q5IpmfCUuDG-PABH10q94ixaLx4_CMrYKoNtQ?e=rKp3cV&download=1" -O "{{ cubemonitor_download_file }}" + # TODO 2025: only zip distributions exists in zip file + # TODO 2025: URL: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EcU8MQwONYZKuk22puks-IgBd1qLM94DH3AA_CEclIgTZg?e=jRcA3v + # TODO 2025: Have extracted setup exe - not sure if this is enough! + win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EbVvZi3q7QRNqwocCSgMvGgB-eYM2mtb-IidD1UTaMgtbw?e=QDxd29" -O "{{ cubemonitor_download_file }}" #win_get_url: # dest: C:\CubeMonitor.exe #register: cubemonitor_download @@ -54,23 +54,24 @@ path: "{{ cubemonitor_download_file }}" arguments: /S - - name: Download STM CUFinder - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EfesbSW7EftDoSjtt-nr_eYBH_EBzXnysW0Lk1wnNzx2Mw?e=HSSmDz&download=1" -O "{{ cufinder_download_file }}" - # #win_get_url: - # # dest: C:\CUFinder.exe - # #register: cubecufinder_download - args: - creates: "{{ cufinder_download_file }}" + # 2025: CUFinder not needed anymore + # - name: Download STM CUFinder + # win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EfesbSW7EftDoSjtt-nr_eYBH_EBzXnysW0Lk1wnNzx2Mw?e=HSSmDz&download=1" -O "{{ cufinder_download_file }}" + # # #win_get_url: + # # # dest: C:\CUFinder.exe + # # #register: cubecufinder_download + # args: + # creates: "{{ cufinder_download_file }}" - - name: Install STM CUFinder - win_package: - path: "{{ cubecufinder_download_file }}" - arguments: /S + # - name: Install STM CUFinder + # win_package: + # path: "{{ cubecufinder_download_file }}" + # arguments: /S - name: Download CubeIDE # win_get_url: - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERpqeASbQ2hDrL9ANNWJf5QBJNhHieXoqaNtduppk42qwg?e=zI8rjI&download=1" -O "{{ cubeide_download_file }}" - #dest: C:\st-stm32cubeide_1.16.0_21983_20240628_1741_x86_64.exe + win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZLOLK_5IxpPvnI_rYH6hSMBuQyH3EEq9bqZr9X_n6cgzA?e=P218RC" -O "{{ cubeide_download_file }}" + #dest: C:\st-stm32cubeide_1.19.0_25607_20250703_0907_x86_64.exe #register: cubeide_download args: creates: "{{ cubeide_download_file }}" @@ -83,12 +84,13 @@ - name: Set CubeIDE default workspace win_lineinfile: - path: C:\ST\STM32CubeIDE_1.10.1\STM32CubeIDE\stm32cubeide.ini + path: C:\ST\STM32CubeIDE_1.19.0\STM32CubeIDE\stm32cubeide.ini regexp: "osgi.instance.area.default" line: "-Dosgi.instance.area.default=D:/RAVINOR/CubeIDE_Workspace" - # Replace -installIU... with -list to get available packages. - - name: Install QEMU - win_command: stm32cubeidec.exe -application org.eclipse.equinox.p2.director -nosplash -repository https://download.eclipse.org/embed-cdt/updates/v6/ -installIU org.eclipse.embedcdt.debug.gdbjtag.qemu.feature.group - args: - chdir: C:\ST\STM32CubeIDE_1.10.1\STM32CubeIDE + # 2025: QEMU not needed anymore + # # Replace -installIU... with -list to get available packages. + # - name: Install QEMU + # win_command: stm32cubeidec.exe -application org.eclipse.equinox.p2.director -nosplash -repository https://download.eclipse.org/embed-cdt/updates/v6/ -installIU org.eclipse.embedcdt.debug.gdbjtag.qemu.feature.group + # args: + # chdir: C:\ST\STM32CubeIDE_1.19.0\STM32CubeIDE From 5620a7ebfe52320929727972a2572f8b69078bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Mon, 18 Aug 2025 15:49:43 +0200 Subject: [PATCH 03/66] Disable CUFinder --- linsetup.yml | 7 ++++--- roles/OR-63717/meta/main.yml | 2 +- roles/RA-63703/meta/main.yml | 2 +- roles/VN-63728/meta/main.yml | 2 +- roles/arduino/tasks/main_win.yml | 5 +++-- roles/cp2102_driver/tasks/main_win.yml | 2 ++ roles/matplotlib/tasks/main_lin.yml | 13 ++++++++++--- roles/stm32cube/tasks/main_win.yml | 1 - setup.yml | 5 ++++- winsetup.yml | 16 +++++++++++----- 10 files changed, 37 insertions(+), 18 deletions(-) diff --git a/linsetup.yml b/linsetup.yml index ba5ac23..8fcfe2b 100644 --- a/linsetup.yml +++ b/linsetup.yml @@ -1,8 +1,8 @@ -- hosts: ucilnice-prototip +- hosts: classroom become_method: sudo become: true vars: - ansible_port: 1001 + # ansible_port: 1001 ansible_ssh_extra_args: '-o ForwardX11=yes' # ansible_become_pass: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' # ansible_password: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' @@ -12,7 +12,8 @@ - vars/credentials.yml - vars/software_keys.yml roles: - # - orange + # - nodejs + # - qcadesigner-e - all_classes # - fri_base # - powerdesigner diff --git a/roles/OR-63717/meta/main.yml b/roles/OR-63717/meta/main.yml index 91b97d4..465e6d2 100644 --- a/roles/OR-63717/meta/main.yml +++ b/roles/OR-63717/meta/main.yml @@ -3,7 +3,7 @@ # Windows, Logisim, Logisim Evolution, RAVINOR, CubeIDE + Tools, VSCode + ST plugin, Putty dependencies: - role: logisim - - role: stm32cube + # - role: stm32cube - role: vscode - role: putty - role: stm32duino diff --git a/roles/RA-63703/meta/main.yml b/roles/RA-63703/meta/main.yml index f92403c..655325d 100644 --- a/roles/RA-63703/meta/main.yml +++ b/roles/RA-63703/meta/main.yml @@ -2,7 +2,7 @@ # Ziga.Pusnik@fri.uni-lj.si, Robert.Rozman@fri.uni-lj.si # Windows, CubeIDE + tools, STMDuino, VSCode, WinIdea 9.21 + GCC + QEMU, Visual2 dependencies: - - role: stm32cube # (CubeMonitor sem vzel samo exe) + # - role: stm32cube # (CubeMonitor sem vzel samo exe) - role: stm32duino - role: vscode - role: putty diff --git a/roles/VN-63728/meta/main.yml b/roles/VN-63728/meta/main.yml index 3bced19..411c38d 100644 --- a/roles/VN-63728/meta/main.yml +++ b/roles/VN-63728/meta/main.yml @@ -2,7 +2,7 @@ # Robert.Rozman@fri.uni-lj.si # Windows, CubeIDE + Tools, STMDuino, VSCode, LTSpice, PulseView,Putty, STM32 Algobuilder & Unicleo GUI dependencies: - - role: stm32cube + #- role: stm32cube - role: stm32duino - role: vscode - role: ltspice diff --git a/roles/arduino/tasks/main_win.yml b/roles/arduino/tasks/main_win.yml index a607b37..ab4558a 100644 --- a/roles/arduino/tasks/main_win.yml +++ b/roles/arduino/tasks/main_win.yml @@ -8,8 +8,9 @@ - name: Install Arduino-cli win_package: # path: https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0_Windows_64bit.exe - path: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip - arguments: /S /AllUsers + path: https://github.com/arduino/arduino-cli/releases/download/v1.3.0/arduino-cli_1.3.0_Windows_64bit.msi + # path: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip + # arguments: /S /AllUsers # creates_path: "%ProgramFiles%\\Arduino IDE\\Arduino IDE.exe" diff --git a/roles/cp2102_driver/tasks/main_win.yml b/roles/cp2102_driver/tasks/main_win.yml index 7f30792..5dcc415 100644 --- a/roles/cp2102_driver/tasks/main_win.yml +++ b/roles/cp2102_driver/tasks/main_win.yml @@ -2,3 +2,5 @@ win_chocolatey: ignore_checksums: true name: cp210x-vcp-drivers-win10 + #TODO remove ignore_errors once the package is repaired/updated + ignore_errors: true diff --git a/roles/matplotlib/tasks/main_lin.yml b/roles/matplotlib/tasks/main_lin.yml index b64ec33..a509286 100644 --- a/roles/matplotlib/tasks/main_lin.yml +++ b/roles/matplotlib/tasks/main_lin.yml @@ -1,4 +1,11 @@ -- name: Install maptplotlib +- name: Install matplotlib apt: - name: matplotlib - state: latest \ No newline at end of file + name: + - python3-matplotlib + - python3-matplotlib-inline + - python3-matplotlib-venn + - python3-mpl-animators + - python3-mpl-scatter-density + - python3-mplcursors + - python3-mplexporter + state: latest diff --git a/roles/stm32cube/tasks/main_win.yml b/roles/stm32cube/tasks/main_win.yml index 6421854..de16294 100644 --- a/roles/stm32cube/tasks/main_win.yml +++ b/roles/stm32cube/tasks/main_win.yml @@ -67,7 +67,6 @@ # win_package: # path: "{{ cubecufinder_download_file }}" # arguments: /S - - name: Download CubeIDE # win_get_url: win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZLOLK_5IxpPvnI_rYH6hSMBuQyH3EEq9bqZr9X_n6cgzA?e=P218RC" -O "{{ cubeide_download_file }}" diff --git a/setup.yml b/setup.yml index 9e7cd09..aeaa82b 100644 --- a/setup.yml +++ b/setup.yml @@ -10,11 +10,14 @@ - name: Install software hosts: '*' become: true + debugger: on_failed vars_files: - vars/software_keys.yml roles: - all_classes - # - matplotlib + # - stm32cube + # - processing + # - powerdesigner # - nodejs # - qcadesigner-e # - fri_base diff --git a/winsetup.yml b/winsetup.yml index c8a4fb3..89aac70 100644 --- a/winsetup.yml +++ b/winsetup.yml @@ -3,19 +3,25 @@ become_method: runas debugger: on_failed vars: - ansible_connection: winrm - ansible_winrm_transport: ntlm - ansible_winrm_server_cert_validation: ignore - ansible_port: 5985 + # ansible_connection: winrm + # ansible_winrm_transport: ntlm + # ansible_winrm_server_cert_validation: ignore + # ansible_port: 5985 + ansible_connection: ssh + ansible_port: 22 + ansible_shell_type: powershell logon_type: interactive installers: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install vars_files: - vars/credentials.yml - vars/software_keys.yml roles: + - fri_base # - all_classes + # - matlab # - stm32cube - - android_studio + # - firefox + # - android_studio #- OR-63717 #- RA-63703 #- VN-63728 From 15ea864ddc55ad65ba5c3859226d4ccca284c8cb Mon Sep 17 00:00:00 2001 From: rozman Date: Sat, 16 Aug 2025 13:31:19 +0200 Subject: [PATCH 04/66] Changes for 2025, except stm32 --- roles/stm32mems-studio/tasks/main.yml | 1 + roles/stm32mems-studio/tasks/main_lin.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/stm32mems-studio/tasks/main.yml b/roles/stm32mems-studio/tasks/main.yml index 3077b7e..146eef8 100644 --- a/roles/stm32mems-studio/tasks/main.yml +++ b/roles/stm32mems-studio/tasks/main.yml @@ -2,3 +2,4 @@ when: ansible_os_family == 'Windows' - import_tasks: main_lin.yml when: ansible_os_family == 'Debian' + diff --git a/roles/stm32mems-studio/tasks/main_lin.yml b/roles/stm32mems-studio/tasks/main_lin.yml index 0fd3d99..fca4773 100644 --- a/roles/stm32mems-studio/tasks/main_lin.yml +++ b/roles/stm32mems-studio/tasks/main_lin.yml @@ -1,4 +1,3 @@ - name: Do not install mems-studio debug: msg: "Do not install mems-studio on Linux" - From 90421ef1d102fc324877b200f9d4c16bb68b9ed2 Mon Sep 17 00:00:00 2001 From: rozman Date: Sat, 16 Aug 2025 13:31:19 +0200 Subject: [PATCH 05/66] Changes for 2025, except stm32 --- roles/stm32mems-studio/tasks/main_lin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/stm32mems-studio/tasks/main_lin.yml b/roles/stm32mems-studio/tasks/main_lin.yml index fca4773..0fd3d99 100644 --- a/roles/stm32mems-studio/tasks/main_lin.yml +++ b/roles/stm32mems-studio/tasks/main_lin.yml @@ -1,3 +1,4 @@ - name: Do not install mems-studio debug: msg: "Do not install mems-studio on Linux" + From e1ac068953933615a45e87abd692e9649b5f2b72 Mon Sep 17 00:00:00 2001 From: "r.rozmann@jung-electronic.de" Date: Thu, 14 Aug 2025 16:37:18 +0200 Subject: [PATCH 06/66] stm32mems-studio added (replaces unicleogui and algobuilder) added to VIN recipe --- roles/stm32mems-studio/tasks/main_lin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/stm32mems-studio/tasks/main_lin.yml b/roles/stm32mems-studio/tasks/main_lin.yml index 0fd3d99..fca4773 100644 --- a/roles/stm32mems-studio/tasks/main_lin.yml +++ b/roles/stm32mems-studio/tasks/main_lin.yml @@ -1,4 +1,3 @@ - name: Do not install mems-studio debug: msg: "Do not install mems-studio on Linux" - From eb1e6012bdb09e23a8768c8f7a4838882f06f9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Tue, 19 Aug 2025 17:56:27 +0200 Subject: [PATCH 07/66] Add requirements for Podatkovno Rudarjenje --- roles/PR-63765/meta/main.yml | 18 ++++++++++++++++++ roles/altair/tasks/main.yml | 4 ++++ roles/altair/tasks/main_lin.yml | 4 ++++ roles/altair/tasks/main_win.yml | 2 ++ roles/datasets/tasks/main.yml | 4 ++++ roles/datasets/tasks/main_lin.yml | 4 ++++ roles/datasets/tasks/main_win.yml | 2 ++ roles/evaluate/tasks/main.yml | 4 ++++ roles/evaluate/tasks/main_lin.yml | 4 ++++ roles/evaluate/tasks/main_win.yml | 2 ++ roles/mlxtend/tasks/main.yml | 4 ++++ roles/mlxtend/tasks/main_lin.yml | 4 ++++ roles/mlxtend/tasks/main_win.yml | 2 ++ roles/networkx/tasks/main.yml | 4 ++++ roles/networkx/tasks/main_lin.yml | 4 ++++ roles/networkx/tasks/main_win.yml | 2 ++ roles/plotly/tasks/main.yml | 4 ++++ roles/plotly/tasks/main_lin.yml | 4 ++++ roles/plotly/tasks/main_win.yml | 2 ++ roles/scikit/tasks/main.yml | 4 ++++ roles/scikit/tasks/main_lin.yml | 6 ++++++ roles/scikit/tasks/main_win.yml | 2 ++ roles/seaborn/tasks/main.yml | 4 ++++ roles/seaborn/tasks/main_lin.yml | 4 ++++ roles/seaborn/tasks/main_win.yml | 2 ++ roles/streamlit/tasks/main.yml | 4 ++++ roles/streamlit/tasks/main_lin.yml | 4 ++++ roles/streamlit/tasks/main_win.yml | 2 ++ roles/torch/tasks/main.yml | 4 ++++ roles/torch/tasks/main_lin.yml | 12 ++++++++++++ roles/torch/tasks/main_win.yml | 2 ++ roles/transformers/tasks/main.yml | 4 ++++ roles/transformers/tasks/main_lin.yml | 4 ++++ roles/transformers/tasks/main_win.yml | 2 ++ 34 files changed, 138 insertions(+) create mode 100644 roles/PR-63765/meta/main.yml create mode 100644 roles/altair/tasks/main.yml create mode 100644 roles/altair/tasks/main_lin.yml create mode 100644 roles/altair/tasks/main_win.yml create mode 100644 roles/datasets/tasks/main.yml create mode 100644 roles/datasets/tasks/main_lin.yml create mode 100644 roles/datasets/tasks/main_win.yml create mode 100644 roles/evaluate/tasks/main.yml create mode 100644 roles/evaluate/tasks/main_lin.yml create mode 100644 roles/evaluate/tasks/main_win.yml create mode 100644 roles/mlxtend/tasks/main.yml create mode 100644 roles/mlxtend/tasks/main_lin.yml create mode 100644 roles/mlxtend/tasks/main_win.yml create mode 100644 roles/networkx/tasks/main.yml create mode 100644 roles/networkx/tasks/main_lin.yml create mode 100644 roles/networkx/tasks/main_win.yml create mode 100644 roles/plotly/tasks/main.yml create mode 100644 roles/plotly/tasks/main_lin.yml create mode 100644 roles/plotly/tasks/main_win.yml create mode 100644 roles/scikit/tasks/main.yml create mode 100644 roles/scikit/tasks/main_lin.yml create mode 100644 roles/scikit/tasks/main_win.yml create mode 100644 roles/seaborn/tasks/main.yml create mode 100644 roles/seaborn/tasks/main_lin.yml create mode 100644 roles/seaborn/tasks/main_win.yml create mode 100644 roles/streamlit/tasks/main.yml create mode 100644 roles/streamlit/tasks/main_lin.yml create mode 100644 roles/streamlit/tasks/main_win.yml create mode 100644 roles/torch/tasks/main.yml create mode 100644 roles/torch/tasks/main_lin.yml create mode 100644 roles/torch/tasks/main_win.yml create mode 100644 roles/transformers/tasks/main.yml create mode 100644 roles/transformers/tasks/main_lin.yml create mode 100644 roles/transformers/tasks/main_win.yml diff --git a/roles/PR-63765/meta/main.yml b/roles/PR-63765/meta/main.yml new file mode 100644 index 0000000..6c638e4 --- /dev/null +++ b/roles/PR-63765/meta/main.yml @@ -0,0 +1,18 @@ +# Podatkovno rudarjenje +# rok.gomiscek@fri.uni-lj.si +# +dependencies: + - role: jupyter + - role: pandas + - role: matplotlib + - role: plotly + - role: seaborn + - role: altair + - role: scikit-learn + - role: mlxtend + - role: networkx + - role: transformers + - role: datasets + - role: evaluate + - role: torch # includes torchvision + - role: streamlit diff --git a/roles/altair/tasks/main.yml b/roles/altair/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/altair/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/altair/tasks/main_lin.yml b/roles/altair/tasks/main_lin.yml new file mode 100644 index 0000000..72354a1 --- /dev/null +++ b/roles/altair/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install altair + apt: + name: python3-altair + state: latest diff --git a/roles/altair/tasks/main_win.yml b/roles/altair/tasks/main_win.yml new file mode 100644 index 0000000..74d8219 --- /dev/null +++ b/roles/altair/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install altair + win_command: pip install altair diff --git a/roles/datasets/tasks/main.yml b/roles/datasets/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/datasets/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/datasets/tasks/main_lin.yml b/roles/datasets/tasks/main_lin.yml new file mode 100644 index 0000000..e2e237b --- /dev/null +++ b/roles/datasets/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install datasets + pip: + executable: pipx + name: datasets diff --git a/roles/datasets/tasks/main_win.yml b/roles/datasets/tasks/main_win.yml new file mode 100644 index 0000000..a614c33 --- /dev/null +++ b/roles/datasets/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install datasets + win_command: pip install datasets diff --git a/roles/evaluate/tasks/main.yml b/roles/evaluate/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/evaluate/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/evaluate/tasks/main_lin.yml b/roles/evaluate/tasks/main_lin.yml new file mode 100644 index 0000000..104c9da --- /dev/null +++ b/roles/evaluate/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install evaluate + pip: + executable: pipx + name: evaluate diff --git a/roles/evaluate/tasks/main_win.yml b/roles/evaluate/tasks/main_win.yml new file mode 100644 index 0000000..7698d3f --- /dev/null +++ b/roles/evaluate/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install evaluate + win_command: pip install evaluate diff --git a/roles/mlxtend/tasks/main.yml b/roles/mlxtend/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/mlxtend/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/mlxtend/tasks/main_lin.yml b/roles/mlxtend/tasks/main_lin.yml new file mode 100644 index 0000000..393f093 --- /dev/null +++ b/roles/mlxtend/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install mlxtend + pip: + executable: pipx + name: mlxtend diff --git a/roles/mlxtend/tasks/main_win.yml b/roles/mlxtend/tasks/main_win.yml new file mode 100644 index 0000000..a486f76 --- /dev/null +++ b/roles/mlxtend/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install pandas + win_command: pip install mlxtend diff --git a/roles/networkx/tasks/main.yml b/roles/networkx/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/networkx/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/networkx/tasks/main_lin.yml b/roles/networkx/tasks/main_lin.yml new file mode 100644 index 0000000..17ef570 --- /dev/null +++ b/roles/networkx/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install networkx + apt: + name: python3-networkx + state: latest diff --git a/roles/networkx/tasks/main_win.yml b/roles/networkx/tasks/main_win.yml new file mode 100644 index 0000000..a66ad83 --- /dev/null +++ b/roles/networkx/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install networkx + win_command: pip install networkx diff --git a/roles/plotly/tasks/main.yml b/roles/plotly/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/plotly/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/plotly/tasks/main_lin.yml b/roles/plotly/tasks/main_lin.yml new file mode 100644 index 0000000..60b4d6e --- /dev/null +++ b/roles/plotly/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install plotly + apt: + name: python3-plotly + state: latest diff --git a/roles/plotly/tasks/main_win.yml b/roles/plotly/tasks/main_win.yml new file mode 100644 index 0000000..3e6e29d --- /dev/null +++ b/roles/plotly/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install plotly + win_command: pip install plotly diff --git a/roles/scikit/tasks/main.yml b/roles/scikit/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/scikit/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/scikit/tasks/main_lin.yml b/roles/scikit/tasks/main_lin.yml new file mode 100644 index 0000000..1db3705 --- /dev/null +++ b/roles/scikit/tasks/main_lin.yml @@ -0,0 +1,6 @@ +- name: Install scikit + apt: + name: + - python3-sklearn + - python3-sklearn-pandas + state: latest diff --git a/roles/scikit/tasks/main_win.yml b/roles/scikit/tasks/main_win.yml new file mode 100644 index 0000000..3b59e53 --- /dev/null +++ b/roles/scikit/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install scikit + win_command: pip install scikit-learn diff --git a/roles/seaborn/tasks/main.yml b/roles/seaborn/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/seaborn/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/seaborn/tasks/main_lin.yml b/roles/seaborn/tasks/main_lin.yml new file mode 100644 index 0000000..23b99fa --- /dev/null +++ b/roles/seaborn/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install seaborn + apt: + name: python3-seaborn + state: latest diff --git a/roles/seaborn/tasks/main_win.yml b/roles/seaborn/tasks/main_win.yml new file mode 100644 index 0000000..4ff22ad --- /dev/null +++ b/roles/seaborn/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install seaborn + win_command: pip install seaborn diff --git a/roles/streamlit/tasks/main.yml b/roles/streamlit/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/streamlit/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/streamlit/tasks/main_lin.yml b/roles/streamlit/tasks/main_lin.yml new file mode 100644 index 0000000..6068e2d --- /dev/null +++ b/roles/streamlit/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install streamlit + pip: + executable: pipx + name: streamlit diff --git a/roles/streamlit/tasks/main_win.yml b/roles/streamlit/tasks/main_win.yml new file mode 100644 index 0000000..56e74a6 --- /dev/null +++ b/roles/streamlit/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install streamlit + win_command: pip install streamlit diff --git a/roles/torch/tasks/main.yml b/roles/torch/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/torch/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/torch/tasks/main_lin.yml b/roles/torch/tasks/main_lin.yml new file mode 100644 index 0000000..51cf087 --- /dev/null +++ b/roles/torch/tasks/main_lin.yml @@ -0,0 +1,12 @@ +- name: Install torch + apt: + name: + - python3-torch + - python3-skorch + - python3-torch-cluster + - python3-torch-geometric + - python3-ignite + - python3-sparse + - python3-torchaudio + - python3-torchvision + state: latest diff --git a/roles/torch/tasks/main_win.yml b/roles/torch/tasks/main_win.yml new file mode 100644 index 0000000..4d1b27b --- /dev/null +++ b/roles/torch/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install torch + win_command: pip install torch torchvision diff --git a/roles/transformers/tasks/main.yml b/roles/transformers/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/transformers/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/transformers/tasks/main_lin.yml b/roles/transformers/tasks/main_lin.yml new file mode 100644 index 0000000..c9ece9b --- /dev/null +++ b/roles/transformers/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install transformers + pip: + executable: pipx: + name: transformers diff --git a/roles/transformers/tasks/main_win.yml b/roles/transformers/tasks/main_win.yml new file mode 100644 index 0000000..1b4f207 --- /dev/null +++ b/roles/transformers/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install transformers + win_command: pip install transformers From d0b2a77216b41146974ed568c16c6f3bffa9b5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Tue, 19 Aug 2025 18:03:28 +0200 Subject: [PATCH 08/66] Add new dependencies and perhaps a maintainer for DPS --- roles/DPS-63744/meta/main.yml | 3 +++ roles/numpy/tasks/main.yml | 4 ++++ roles/numpy/tasks/main_lin.yml | 5 +++++ roles/numpy/tasks/main_win.yml | 2 ++ 4 files changed, 14 insertions(+) create mode 100644 roles/numpy/tasks/main.yml create mode 100644 roles/numpy/tasks/main_lin.yml create mode 100644 roles/numpy/tasks/main_win.yml diff --git a/roles/DPS-63744/meta/main.yml b/roles/DPS-63744/meta/main.yml index 1ebf218..bd30f3d 100644 --- a/roles/DPS-63744/meta/main.yml +++ b/roles/DPS-63744/meta/main.yml @@ -1,8 +1,11 @@ # Digitalno procesiranje signalov # Aleks.Huc@fri.uni-lj.si +# metod.celestina@dewesoft.si # Windows, GNU/Linux, Matlab, wfdb, Octave, Audacity dependencies: - role: matlab - role: wfdb - role: octave - role: audacity + - role: numpy + - role: matplotlib diff --git a/roles/numpy/tasks/main.yml b/roles/numpy/tasks/main.yml new file mode 100644 index 0000000..66e93fe --- /dev/null +++ b/roles/numpy/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' \ No newline at end of file diff --git a/roles/numpy/tasks/main_lin.yml b/roles/numpy/tasks/main_lin.yml new file mode 100644 index 0000000..66e66b2 --- /dev/null +++ b/roles/numpy/tasks/main_lin.yml @@ -0,0 +1,5 @@ +- name: Install numpy + apt: + name: + - python3-numpy + state: latest diff --git a/roles/numpy/tasks/main_win.yml b/roles/numpy/tasks/main_win.yml new file mode 100644 index 0000000..ee12580 --- /dev/null +++ b/roles/numpy/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install numpy + win_command: pip install numpy From bcb4d836b2f7d15edb7ce67ac45ace9ec202b2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Thu, 21 Aug 2025 00:13:20 +0200 Subject: [PATCH 09/66] Fix logisim unpack/install --- roles/logisim/tasks/main_lin.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/logisim/tasks/main_lin.yml b/roles/logisim/tasks/main_lin.yml index 0885e90..c9a2213 100644 --- a/roles/logisim/tasks/main_lin.yml +++ b/roles/logisim/tasks/main_lin.yml @@ -11,6 +11,10 @@ dest: /opt/logisim remote_src: yes creates: /opt/logisim/META-INF/MANIFEST.MF + - name: Create destination for Logisim - Evolution + file: + path: /opt/logisim-evolution + state: directory - name: Download and unpack Logisim - Evolution unarchive: src: https://github.com/logisim-evolution/logisim-evolution/releases/download/v3.9.0/logisim-evolution-3.9.0-all.jar From 782f385a296bf3dd098a99e6fe33ecf388476bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Thu, 21 Aug 2025 00:13:35 +0200 Subject: [PATCH 10/66] Add snapper --- roles/fri_base/tasks/main_lin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index d301d09..8f0f686 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -27,6 +27,7 @@ - wine32:i386 - wine-binfmt - dosbox + - snapper # - webext-ublock-origin-chromium # - webext-ublock-origin-firefox - nethack-console From 8136635a6fd71118fefde8fb160994245ed67dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= Date: Thu, 21 Aug 2025 00:14:07 +0200 Subject: [PATCH 11/66] Add unattended install files --- unattended_install/ubuntu/autoinstall.yml | 194 ++++++++++++ unattended_install/win/autounattend.xml | 356 ++++++++++++++++++++++ 2 files changed, 550 insertions(+) create mode 100644 unattended_install/ubuntu/autoinstall.yml create mode 100644 unattended_install/win/autounattend.xml diff --git a/unattended_install/ubuntu/autoinstall.yml b/unattended_install/ubuntu/autoinstall.yml new file mode 100644 index 0000000..d3d80e8 --- /dev/null +++ b/unattended_install/ubuntu/autoinstall.yml @@ -0,0 +1,194 @@ +#cloud-config +autoinstall: + apt: + disable_components: [] + fallback: offline-install + geoip: true + mirror-selection: + primary: + - country-mirror + - arches: &id001 + - amd64 + - i386 + uri: http://archive.ubuntu.com/ubuntu/ + - arches: &id002 + - s390x + - arm64 + - armhf + - powerpc + - ppc64el + - riscv64 + uri: http://ports.ubuntu.com/ubuntu-ports + preserve_sources_list: false + security: + - arches: *id001 + uri: http://security.ubuntu.com/ubuntu/ + - arches: *id002 + uri: http://ports.ubuntu.com/ubuntu-ports + codecs: + install: true + drivers: + install: true + identity: + hostname: ucilnica + password: $6$TlnOwdSPWxPW4DBb$.QyE0mgGQ8y7eavPpa/RgakcsBbwDRXobcYdZJMek3yNuGmVKdYEMfVG.biguVblI08dNfSa/JgOxMgl2IqHb. + realname: IT FRI + username: local_admin + kernel: + package: linux-generic + keyboard: + layout: si + toggle: null + variant: '' + locale: en_US.UTF-8 + network: + ethernets: + ens18: + dhcp4: true + version: 2 + oem: + install: auto + source: + id: xubuntu-desktop + search_drivers: true + ssh: + allow-pw: true + authorized-keys: [] + install-server: false + storage: + config: + - ptable: gpt + path: /dev/vda + preserve: true + name: '' + grub_device: false + id: disk-vda + type: disk + - device: disk-vda + size: 639631360 + flag: boot + number: 1 + preserve: true + grub_device: true + offset: 1048576 + partition_type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b + partition_name: EFI system partition + path: /dev/vda1 + uuid: 269e71a1-6ae2-4591-a060-b6ac82ffe698 + id: partition-vda1 + type: partition + - device: disk-vda + size: 16777216 + flag: msftres + number: 2 + preserve: true + grub_device: false + offset: 642777088 + partition_type: e3c9e316-0b5c-4db8-817d-f92df00215ae + partition_name: Microsoft reserved partition + path: /dev/vda2 + uuid: ab263f9b-a6ef-4131-946c-8db62cc2fce3 + id: partition-vda2 + type: partition + - device: disk-vda + size: 354904178688 + number: 3 + preserve: true + grub_device: false + offset: 659554304 + partition_type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + partition_name: Basic data partition + path: /dev/vda3 + uuid: 1e6326a1-a4d4-4225-820a-eca56bfbba1b + id: partition-vda3 + type: partition + - device: disk-vda + size: 762314752 + number: 4 + preserve: true + grub_device: false + offset: 355563732992 + partition_type: de94bba4-06d1-4d40-a16a-bfd50179d6ac + path: /dev/vda4 + uuid: 53e306ac-91a6-4841-81a7-d965910fd1c6 + id: partition-vda4 + type: partition + - device: disk-vda + size: 120000086016 + wipe: superblock + flag: linux + number: 5 + preserve: true + grub_device: false + offset: 356326047744 + partition_type: 0fc63daf-8483-4772-8e79-3d69d8477de4 + path: /dev/vda5 + uuid: 9db5f9d0-33a0-4ca0-9562-649c24ca7499 + id: partition-vda5 + type: partition + - fstype: btrfs + volume: partition-vda5 + preserve: false + id: format-0 + type: format + - path: / + device: format-0 + id: mount-0 + type: mount + - fstype: vfat + volume: partition-vda1 + preserve: true + id: format-partition-vda1 + type: format + - path: /boot/efi + device: format-partition-vda1 + id: mount-1 + type: mount + - device: disk-vda + size: 8000634880 + wipe: superblock + flag: linux + number: 6 + preserve: true + grub_device: false + offset: 476326133760 + partition_type: 0fc63daf-8483-4772-8e79-3d69d8477de4 + path: /dev/vda6 + uuid: 2c990bfc-89d7-43b7-bb1b-0151d44f72cb + id: partition-vda6 + type: partition + - fstype: btrfs + volume: partition-vda6 + preserve: false + id: format-1 + type: format + - path: /home + device: format-1 + id: mount-2 + type: mount + - device: disk-vda + size: 19256049664 + number: 7 + preserve: true + grub_device: false + offset: 484326768640 + partition_type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 + partition_name: Basic data partition + path: /dev/vda7 + uuid: 3cc1570d-e2ed-4337-b520-f57bbe953c66 + id: partition-vda7 + type: partition + timezone: Europe/Ljubljana + updates: security + packages: + - openssh-server + late-commands: + - 'echo "#cloud-config" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo "users:" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo " - name: local_admin" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo " ssh_authorized_keys:" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo " - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM2Tn8+rH+fkFkBycxYrJ7TzhXQhuf3U+w23JFlZoRiX polz@povzpetnik" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo " - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRpoWIH5u2g12IM39WNRzLsPksfSjfL/82fPnuZwZ7H polz@it-polz" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'echo " - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCq7NrrDD53pe9Zpn/dRSPxWQLDIZ9INS0kz/ps/9fGsM8/H/J7jr/ecj0j0jfYig6QdV8G7VnpLWjcuJ65ul3u2rnQSN78Ms/hxlAhmyahQtBA2q2D2zqI2PDWsKAySWmfFg+2W5fYmE1+F9GEB0OWNOuClmfo2A1c8Ve76qSiehHgjYo0G1CQrXkmE00GBLqyqkbyyStLa9DUfaDwrbOu4tJChHo4jDGuLH5QCYcN+RRXjwPQKgk0L2yfu1479L0XqhbEo+KHoIZH501fkoE+gUKVyLERvkhKSiCgPhJmAgRN1bRsiyTwvQzoED4q1RwFmG0AKg0U5bHnAAOd77uyuIYmcFiaRGHROQ9ZbyB9tJ07QrFlzRkderDd5Z18mO7LtgDjFZ2B2DlRY6zxMiUqJyDRnHjDF3+3DTlHIUCC3aEtoYS8MPyRL1b8XenIqswXkM+vkYFeKh2ynjNu3C6VqDCXZFvIi6f1X0ojZXRrDmbiON8Y74HjxP0z6TB1U30= polz@ucilnicenfs-2020" >> /target/etc/cloud/cloud.cfg.d/99-ssh_keys.cfg' + - 'curtin in-target -- sed -i "s/\\(%sudo.*\\) ALL/\\1 NOPASSWD: ALL/" /etc/sudoers' + version: 1 diff --git a/unattended_install/win/autounattend.xml b/unattended_install/win/autounattend.xml new file mode 100644 index 0000000..bfb33fe --- /dev/null +++ b/unattended_install/win/autounattend.xml @@ -0,0 +1,356 @@ + + + + + + + + en-US + + 0409:00000424 + en-US + en-US + en-US + + + + + + 0 + 3 + + + + + + YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY + OnError + + true + + false + + + 1 + cmd.exe /c ">>"X:\diskpart.txt" (echo:REM)" + + + 2 + cmd.exe /c "diskpart.exe /s "X:\diskpart.txt" >>"X:\diskpart.log" || ( type "X:\diskpart.log" & echo diskpart encountered an error. & pause & exit /b 1 )" + + + + + + + + ucilnica + Central Europe Standard Time + + + + + 1 + powershell.exe -WindowStyle Normal -NoProfile -Command "$xml = [xml]::new(); $xml.Load('C:\Windows\Panther\unattend.xml'); $sb = [scriptblock]::Create( $xml.unattend.Extensions.ExtractScript ); Invoke-Command -ScriptBlock $sb -ArgumentList $xml;" + + + 2 + powershell.exe -WindowStyle Normal -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\Specialize.ps1' -Raw | Invoke-Expression;" + + + 3 + reg.exe load "HKU\DefaultUser" "C:\Users\Default\NTUSER.DAT" + + + 4 + powershell.exe -WindowStyle Normal -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\DefaultUser.ps1' -Raw | Invoke-Expression;" + + + 5 + reg.exe unload "HKU\DefaultUser" + + + + + + + + + 0409:00000424 + en-US + en-US + en-US + + + + + + local_admin + FRI IT + Administrators + + 6tfc5rdx + true</PlainText> + </Password> + </LocalAccount> + <LocalAccount wcm:action="add"> + <Name>Student</Name> + <DisplayName>Student</DisplayName> + <Group>Users</Group> + <Password> + <Value>vaje</Value> + <PlainText>true</PlainText> + </Password> + </LocalAccount> + </LocalAccounts> + </UserAccounts> + <AutoLogon> + <Username>local_admin</Username> + <Enabled>true</Enabled> + <LogonCount>1</LogonCount> + <Password> + <Value>6tfc5rdx</Value> + <PlainText>true</PlainText> + </Password> + </AutoLogon> + <OOBE> + <ProtectYourPC>3</ProtectYourPC> + <HideEULAPage>true</HideEULAPage> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <HideOnlineAccountScreens>false</HideOnlineAccountScreens> + </OOBE> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <Order>1</Order> + <CommandLine>powershell.exe -WindowStyle Normal -NoProfile -Command "Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\FirstLogon.ps1' -Raw | Invoke-Expression;"</CommandLine> + </SynchronousCommand> + </FirstLogonCommands> + </component> + </settings> + <Extensions xmlns="https://schneegans.de/windows/unattend-generator/"> + <ExtractScript> +param( + [xml] $Document +); + +foreach( $file in $Document.unattend.Extensions.File ) { + $path = [System.Environment]::ExpandEnvironmentVariables( $file.GetAttribute( 'path' ) ); + mkdir -Path( $path | Split-Path -Parent ) -ErrorAction 'SilentlyContinue'; + $encoding = switch( [System.IO.Path]::GetExtension( $path ) ) { + { $_ -in '.ps1', '.xml' } { [System.Text.Encoding]::UTF8; } + { $_ -in '.reg', '.vbs', '.js' } { [System.Text.UnicodeEncoding]::new( $false, $true ); } + default { [System.Text.Encoding]::Default; } + }; + $bytes = $encoding.GetPreamble() + $encoding.GetBytes( $file.InnerText.Trim() ); + [System.IO.File]::WriteAllBytes( $path, $bytes ); +} + </ExtractScript> + <File path="C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1"> +&amp; { + foreach( $letter in 'DEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() ) { + $exe = "${letter}:\virtio-win-guest-tools.exe"; + if( Test-Path -LiteralPath $exe ) { + Start-Process -FilePath $exe -ArgumentList '/passive', '/norestart' -Wait; + return; + } + } + 'VirtIO Guest Tools image (virtio-win-*.iso) is not attached to this VM.'; +} *&gt;&amp;1 &gt;&gt; 'C:\Windows\Setup\Scripts\VirtIoGuestTools.log'; + </File> + <File path="C:\Windows\Setup\Scripts\unattend-01.ps1"> +Get-WindowsCapability -Name OpenSSH.Server* -Online | + Add-WindowsCapability -Online + +$firewallParams = @{ + Name = 'sshd-Server-In-TCP' + DisplayName = 'Inbound rule for OpenSSH Server (sshd) on TCP port 22' + Action = 'Allow' + Direction = 'Inbound' + Enabled = 'True' # This is not a boolean but an enum + Profile = 'Any' + Protocol = 'TCP' + LocalPort = 22 +} +New-NetFirewallRule @firewallParams + +$shellParams = @{ + Path = 'HKLM:\SOFTWARE\OpenSSH' + Name = 'DefaultShell' + Value = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' + PropertyType = 'String' + Force = $true +} +New-ItemProperty @shellParams + +# Set default to powershell.exe +$shellParams = @{ + Path = 'HKLM:\SOFTWARE\OpenSSH' + Name = 'DefaultShell' + Value = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' + PropertyType = 'String' + Force = $true +} +New-ItemProperty @shellParams + +# Set time to UTC +$shellParams = @{ + Path = 'HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation' + Name = 'RealTimeIsUniversal' + Value = '00000001' + PropertyType = 'dword' + Force = $true +} +New-ItemProperty @shellParams + + +Set-Service -Name sshd -StartupType Automatic -Status Running + </File> + <File path="C:\Windows\Setup\Scripts\unattend-02.ps1"> +Set-Service -Name sshd -StartupType Automatic -Status Running + </File> + <File path="C:\Windows\Setup\Scripts\Specialize.ps1"> +$scripts = @( + { + reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f; + }; + { + net.exe accounts /maxpwage:UNLIMITED; + }; + { + netsh.exe advfirewall firewall set rule group="@FirewallAPI.dll,-28752" new enable=Yes; + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-01.ps1' -Raw | Invoke-Expression; + }; +); + +&amp; { + [float] $complete = 0; + [float] $increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Activity 'Running scripts to customize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 &gt;&gt; "C:\Windows\Setup\Scripts\Specialize.log"; + </File> + <File path="C:\Windows\Setup\Scripts\UserOnce.ps1"> +$scripts = @( + { + Set-WinHomeLocation -GeoId 212; + }; + { + Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -Type 'DWord' -Value 1; + }; +); + +&amp; { + [float] $complete = 0; + [float] $increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Activity 'Running scripts to configure this user account. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 &gt;&gt; "$env:TEMP\UserOnce.log"; + </File> + <File path="C:\Windows\Setup\Scripts\DefaultUser.ps1"> +$scripts = @( + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f; + }; + { + reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v "UnattendedSetup" /t REG_SZ /d "powershell.exe -WindowStyle Normal -NoProfile -Command \""Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\UserOnce.ps1' -Raw | Invoke-Expression;\""" /f; + }; +); + +&amp; { + [float] $complete = 0; + [float] $increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Activity 'Running scripts to modify the default user&#x2019;&#x2019;s registry hive. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 &gt;&gt; "C:\Windows\Setup\Scripts\DefaultUser.log"; + </File> + <File path="C:\Windows\Setup\Scripts\FirstLogon.ps1"> +$scripts = @( + { + Set-ItemProperty -LiteralPath 'Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' -Name 'AutoLogonCount' -Type 'DWord' -Force -Value 0; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1' -Raw | Invoke-Expression; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-02.ps1' -Raw | Invoke-Expression; + }; +); + +&amp; { + [float] $complete = 0; + [float] $increment = 100 / $scripts.Count; + foreach( $script in $scripts ) { + Write-Progress -Activity 'Running scripts to finalize your Windows installation. Do not close this window.' -PercentComplete $complete; + '*** Will now execute command &#xAB;{0}&#xBB;.' -f $( + $str = $script.ToString().Trim() -replace '\s+', ' '; + $max = 100; + if( $str.Length -le $max ) { + $str; + } else { + $str.Substring( 0, $max - 1 ) + '&#x2026;'; + } + ); + $start = [datetime]::Now; + &amp; $script; + '*** Finished executing command after {0:0} ms.' -f [datetime]::Now.Subtract( $start ).TotalMilliseconds; + "`r`n" * 3; + $complete += $increment; + } +} *&gt;&amp;1 &gt;&gt; "C:\Windows\Setup\Scripts\FirstLogon.log"; + </File> + </Extensions> +</unattend> \ No newline at end of file From 41b392ee1e5294519dc9bb4ed3711bf45432c4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 29 Aug 2025 15:13:53 +0200 Subject: [PATCH 12/66] =?UTF-8?q?Honor=20requests=20by=20Luka=20F=C7=94rst?= =?UTF-8?q?,=20apart=20from=20shared=20homes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/P1-63277/meta/main.yml | 1 + roles/fri_base/tasks/main_lin.yml | 12 ++++++++++++ roles/jdk/tasks/main_lin.yml | 9 +++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/roles/P1-63277/meta/main.yml b/roles/P1-63277/meta/main.yml index 6c58609..7f729a8 100644 --- a/roles/P1-63277/meta/main.yml +++ b/roles/P1-63277/meta/main.yml @@ -6,3 +6,4 @@ dependencies: - role: gedit - role: mono - role: vscode + - role: notepad++ diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 8f0f686..9ada163 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -50,6 +50,8 @@ - neovim-qt - binwalk - iotop + - evince + - okular - htop - jdupes state: latest @@ -145,3 +147,13 @@ copy: dest: /etc/udev/rules.d/ src: 99-wakeonlan.rules + +- name: Shorten PS1 prompt + replace: + path: "{{ item }}" + regexp: 'PS1=(.*)\\u@\\h' + replace: PS1=\1${USER%@*} + loop: + - /etc/skel/.bashrc + - /etc/profile + - /etc/bash.bashrc diff --git a/roles/jdk/tasks/main_lin.yml b/roles/jdk/tasks/main_lin.yml index 04dd67e..8c2a94e 100644 --- a/roles/jdk/tasks/main_lin.yml +++ b/roles/jdk/tasks/main_lin.yml @@ -1,6 +1,11 @@ -- name: Install OpenJDK 21 +- name: Install latest OpenJDK (25) apt: - name: openjdk-21-jdk + name: openjdk-25-jdk + state: latest + +- name: Install latest Java docs + apt: + name: openjdk-25-doc state: latest - name: Install OpenJDK 17 From 4175f483db95018553754c71c2c61fc4970fb650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sat, 30 Aug 2025 09:21:05 +0200 Subject: [PATCH 13/66] Install PowerDesigner to large_prog_dir --- roles/powerdesigner/tasks/main_win.yml | 8 ++- roles/powerdesigner/templates/setup.iss | 74 ++++++++++++++----------- 2 files changed, 47 insertions(+), 35 deletions(-) diff --git a/roles/powerdesigner/tasks/main_win.yml b/roles/powerdesigner/tasks/main_win.yml index 96773f2..2e45bca 100644 --- a/roles/powerdesigner/tasks/main_win.yml +++ b/roles/powerdesigner/tasks/main_win.yml @@ -1,9 +1,13 @@ # The installer does not work from powershell in silent mode. # +- name: Prepare PowerDesigner setup.iss + template: + src: setup.iss + dest: c:\powerdesigner_setup.iss + - name: Install PowerDesigner win_shell: | - {{ installers }}\PowerDesigner_12.5\cd1\setup\setup.exe /s /f1"{{ installers }}\PowerDesigner_12.5\setup.iss" /f2"C:\powerdesigner_log.iss" - + {{ installers }}\PowerDesigner_12.5\cd1\setup\setup.exe /s /f1"c:\powerdesigner_setup.iss" /f2"C:\powerdesigner_log.iss" args: executable: cmd diff --git a/roles/powerdesigner/templates/setup.iss b/roles/powerdesigner/templates/setup.iss index 8503670..7519aaf 100755 --- a/roles/powerdesigner/templates/setup.iss +++ b/roles/powerdesigner/templates/setup.iss @@ -3,37 +3,37 @@ Version=v7.00 File=Response File [File Transfer] OverwrittenReadOnly=NoToAll -[{{ powerdesigner_key }}-DlgOrder] -Dlg0={{ powerdesigner_key }}-SdWelcome-0 +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-DlgOrder] +Dlg0={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdWelcome-0 Count=10 -Dlg1={{ powerdesigner_key }}-SybSelectInstallMode-0 -Dlg2={{ powerdesigner_key }}-SybFlexLM-0 -Dlg3={{ powerdesigner_key }}-SybSelectPackage-0 -Dlg4={{ powerdesigner_key }}-Sybase License-0 -Dlg5={{ powerdesigner_key }}-SdAskDestPath-0 -Dlg6={{ powerdesigner_key }}-SdComponentTree-0 -Dlg7={{ powerdesigner_key }}-Graphic Select Folder-0 -Dlg8={{ powerdesigner_key }}-SdStartCopy-0 -Dlg9={{ powerdesigner_key }}-SdFinish-0 -[{{ powerdesigner_key }}-SdWelcome-0] +Dlg1={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybSelectInstallMode-0 +Dlg2={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybFlexLM-0 +Dlg3={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybSelectPackage-0 +Dlg4={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-Sybase License-0 +Dlg5={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdAskDestPath-0 +Dlg6={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdComponentTree-0 +Dlg7={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-Graphic Select Folder-0 +Dlg8={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdStartCopy-0 +Dlg9={DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdFinish-0 +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdWelcome-0] Result=1 -[{{ powerdesigner_key }}-SybSelectInstallMode-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybSelectInstallMode-0] Mode=3 Result=1 -[{{ powerdesigner_key }}-SybFlexLM-0] -LicenseServer=todo.fri1.uni-lj.si +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybFlexLM-0] +LicenseServer=todo.fri.uni-lj.si PortNumber=27000 Result=1 -[{{ powerdesigner_key }}-SybSelectPackage-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SybSelectPackage-0] Package=Studio Enterprise Result=1 -[{{ powerdesigner_key }}-Sybase License-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-Sybase License-0] Sybase_License=accept -[{{ powerdesigner_key }}-SdAskDestPath-0] -szDir=C:\Program Files (x86)\Sybase\PowerDesigner 12 +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdAskDestPath-0] +szDir={{ large_prog_dir }}\PowerDesigner 12 Result=1 -[{{ powerdesigner_key }}-SdComponentTree-0] -szDir=C:\Program Files (x86)\Sybase\PowerDesigner 12 +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdComponentTree-0] +szDir={{ large_prog_dir }}\PowerDesigner 12 CR\FRM-type=string CR\FRM-count=2 CR\FRM-0=CR\FRM\FRM_Xem @@ -108,11 +108,6 @@ PDM-1=PDM\PDM_Examples PDM-2=PDM\PDM_Report PDM-3=PDM\PDM_Tools PDM-4=PDM\PDM_Addins -RQM-type=string -RQM-count=3 -RQM-0=RQM\RQM_License -RQM-1=RQM\RQM_Examples -RQM-2=RQM\RQM_Report XSM-type=string XSM-count=4 XSM-0=XSM\XSM_License @@ -135,6 +130,19 @@ PDF-5=PDF\PDF_PDM PDF-6=PDF\PDF_RQM PDF-7=PDF\PDF_XSM PDF-8=PDF\PDF_RPY +VIDEO-type=string +VIDEO-count=11 +VIDEO-0=VIDEO\Video_int +VIDEO-1=VIDEO\Video_Gen +VIDEO-2=VIDEO\Video_BPM +VIDEO-3=VIDEO\Video_CDM +VIDEO-4=VIDEO\Video_ILM +VIDEO-5=VIDEO\Video_OOM +VIDEO-6=VIDEO\Video_PDM +VIDEO-7=VIDEO\Video_RQM +VIDEO-8=VIDEO\Video_xsm +VIDEO-9=VIDEO\Video_RPY +VIDEO-10=VIDEO\Video_htm Component-type=string Component-count=10 Component-0=CR @@ -143,15 +151,15 @@ Component-2=CDM Component-3=ILM Component-4=OOM Component-5=PDM -Component-6=RQM -Component-7=XSM -Component-8=RPY -Component-9=PDF +Component-6=XSM +Component-7=RPY +Component-8=PDF +Component-9=VIDEO Result=1 -[{{ powerdesigner_key }}-Graphic Select Folder-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-Graphic Select Folder-0] szFolder=Sybase\PowerDesigner 12 Result=1 -[{{ powerdesigner_key }}-SdStartCopy-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdStartCopy-0] Keep_Settings=0 Result=1 [Application] @@ -159,7 +167,7 @@ Name=Sybase PowerDesigner 12.5 Version=12.5.2169 Company=Sybase Lang=0009 -[{{ powerdesigner_key }}-SdFinish-0] +[{DA53ABD7-6592-45DA-A6DD-287A48F74D37}-SdFinish-0] Result=1 bOpt1=0 bOpt2=0 From 707090192c2613dff7bb6af3ebee4321c9e542cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sat, 30 Aug 2025 12:45:18 +0200 Subject: [PATCH 14/66] Fix indentation --- roles/omnetpp/tasks/main_win.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/omnetpp/tasks/main_win.yml b/roles/omnetpp/tasks/main_win.yml index 833b000..d17b337 100644 --- a/roles/omnetpp/tasks/main_win.yml +++ b/roles/omnetpp/tasks/main_win.yml @@ -3,7 +3,7 @@ - name: Set OMNet++ version set_fact: target_version: "6.2.0" - target_dir: "C:\\OMNeT++" + target_dir: "{{large_prog_dir}}\\OMNeT++" - name: Check OMNet++ install status win_stat: @@ -15,17 +15,23 @@ - name: Download OMNet++ win_get_url: url: "https://github.com/omnetpp/omnetpp/releases/download/omnetpp-{{ target_version }}/omnetpp-{{ target_version }}-windows-x86_64.7z" - dest: C:\ + dest: "{{ large_prog_dir }}" register: download - name: Unzip OMNet++ win_unzip: src: "{{ download.dest }}" - dest: C:\ + dest: "{{ large_prog_dir }}" delete_archive: yes - name: Move OMNet++ to final location - win_command: cmd.exe /c move "C:\omnetpp-{{ target_version }}" "{{ target_dir }}" + ansible.windows.win_powershell: + script: move "{{ large_prog_dir }}\omnetpp-{{ target_version }}" "{{ target_dir }}" + # win_robocopy: + # src: "{{ large_prog_dir }}\\omnetpp-{{ target_version }}" + # dest: "{{ target_dir }}" + # flags: "/move" + # win_command: cmd.exe /c move "c:\omnetpp-{{ target_version }}" "{{ target_dir }}" - name: Create OMNet++ compile script win_copy: @@ -40,7 +46,7 @@ line: call "%HOME%\\tools\\win32.x86_64\\msys2_shell.cmd" -mingw64 -c "./configure && make -j4" & exit - name: Compile OMNet++ - win_command: cmd.exe /c "{{ target_dir }}\\mingwenv-install.cmd" + win_command: cmd.exe /c "{{ target_dir }}\mingwenv-install.cmd" - name: Copy OMNet++ shortcut win_copy: From beb1dbb757eb931edb153be1e3c0aa04331e34f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sat, 30 Aug 2025 13:10:28 +0200 Subject: [PATCH 15/66] Fix Android install on Windows, install to large_prog_dir --- roles/android_studio/tasks/main_win.yml | 93 ++++++++++++++++--------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/roles/android_studio/tasks/main_win.yml b/roles/android_studio/tasks/main_win.yml index a209379..e4de8ee 100644 --- a/roles/android_studio/tasks/main_win.yml +++ b/roles/android_studio/tasks/main_win.yml @@ -1,27 +1,68 @@ - name: Set Android Studio version set_fact: - sdk_path: C:\android-sdk - studio_version: "2025.1.2.11" - tools_version: "latest" + studio_path: "{{ large_prog_dir }}\\android-studio" + studio_version: "2025.1.2.13" + tools_version: "13114758_latest" + +- name: Set Android command-line tools path + set_fact: + tools_path: "{{ studio_path }}\\cmdline-tools\\latest" + +- name: Check Android Studio + win_stat: + path: "{{ studio_path }}\\bin\\studio64.exe" + register: studio + +- when: not studio.stat.exists + block: + - name: Download Android Studio + win_get_url: + url: "https://redirector.gvt1.com/edgedl/android/studio/ide-zips/{{ studio_version }}/android-studio-{{ studio_version }}-windows.zip" + dest: "{{ large_prog_dir }}\\" + + - name: Extract Android Studio + win_unzip: + src: "{{ large_prog_dir }}\\android-studio-{{ studio_version }}-windows.zip" + dest: "{{ large_prog_dir }}\\" + delete_archive: yes - name: Check Android Studio tools win_stat: - path: "{{ sdk_path }}\\platform-tools\\adb.exe" + path: "{{ tools_path }}\\bin\\sdkmanager.bat" register: tools - when: not tools.stat.exists block: - name: Download Android Studio tools win_get_url: - # url: "https://dl.google.com/android/repository/commandlinetools-win-{{ tools_version }}.zip" - url: "https://dl.google.com/android/repository/platform-tools-{{ tools_version }}-windows.zip" - dest: C:\ + url: "https://dl.google.com/android/repository/commandlinetools-win-{{ tools_version }}.zip" + # url: "https://dl.google.com/android/repository/platform-tools-{{ tools_version }}-windows.zip" + dest: "{{ studio_path }}" - name: Extract Android Studio tools win_unzip: - src: "C:\\platform-tools-{{ tools_version }}-windows.zip" - dest: "{{ sdk_path }}\\" + # src: "{{ large_prog_dir }}\\platform-tools-{{ tools_version }}-windows.zip" + src: "{{ studio_path}}\\commandlinetools-win-{{ tools_version }}.zip" + dest: "{{ studio_path }}\\cmdline-tools\\" delete_archive: yes + - name: Move cmdline-tools to expected location + ansible.windows.win_powershell: + script: move "{{ studio_path }}\\cmdline-tools\\cmdline-tools" "{{ tools_path }}" + +- name: Create Android Studio data directory + win_file: + path: "{{ large_prog_dir }}\\.android" + state: directory + +- name: Set Android Studio environment variables + win_environment: + level: machine + variables: + ANDROID_HOME: "{{ studio_path }}" + ANDROID_SDK_ROOT: "{{ studio_path }}" + ANDROID_PREFS_ROOT: "{{ large_prog_dir }}\\" + GRADLE_USER_HOME: "{{ large_prog_dir }}\\.gradle" + # - name: Accept Android SDK licenses # win_shell: sh -c "yes | /c/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager.bat --licenses" @@ -29,35 +70,21 @@ - name: Include Android SDK packages include_vars: androidsdk_packages.yml -#- name: Install Android SDK -# win_shell: | -# {{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager --install "{{ item }}" -# loop: "{{ AndroidSDK_packages }}" +- name: Install Android SDK packages + win_shell: | + {{ tools_path }}\bin\sdkmanager.bat --install "{{ item }}" + loop: "{{ AndroidSDK_packages }}" # {{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager --install "{{ AndroidSDK_packages | join(' ') }}" # {{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager --install "build-tools;33.0.0" "cmdline-tools;latest" "emulator" "ndk-bundle" "ndk;25.1.8937393" "platform-tools" "platforms;android-33" "sources;android-33" "system-images;android-33;google_apis;arm64-v8a" "system-images;android-33;google_apis;x86_64" -- name: Install Android Studio - win_package: - path: "https://redirector.gvt1.com/edgedl/android/studio/install/{{ studio_version }}/android-studio-{{ studio_version }}-windows.exe" - arguments: /S /AllUsers - expected_return_code: [0, 1223, 3010] - creates_path: "%ProgramFiles%\\Android\\Android Studio\\bin\\studio64.exe" - -- name: Create Android Studio data directory - win_file: - path: D:\.android - state: directory - -- name: Set Android Studio environment variables - win_environment: - level: machine - variables: - ANDROID_HOME: "{{ sdk_path }}" - ANDROID_PREFS_ROOT: D:\ - GRADLE_USER_HOME: D:\.gradle - +#- name: Install Android Studio +# win_package: +# path: "https://redirector.gvt1.com/edgedl/android/studio/install/{{ studio_version }}/android-studio-{{ studio_version }}-windows.exe" +# arguments: /S /AllUsers +# expected_return_code: [0, 1223, 3010] +# creates_path: "%ProgramFiles%\\Android\\Android Studio\\bin\\studio64.exe" #- name: Check HAXM install status # win_stat: # path: "%ProgramFiles%\\Intel\\HAXM" From 957cd67eb72c70c173515de2996dba3bd46edfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sun, 31 Aug 2025 23:36:23 +0200 Subject: [PATCH 16/66] Add user homes on CIFS on Linux --- roles/ad_joined/files/pam_mount.conf.xml | 20 ++++++++ roles/ad_joined/tasks/main_lin.yml | 61 ++++++++++++++++++------ roles/ad_joined/tasks/main_win.yml | 9 ++++ roles/ad_joined/templates/sssd.conf | 1 + 4 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 roles/ad_joined/files/pam_mount.conf.xml diff --git a/roles/ad_joined/files/pam_mount.conf.xml b/roles/ad_joined/files/pam_mount.conf.xml new file mode 100644 index 0000000..01eb506 --- /dev/null +++ b/roles/ad_joined/files/pam_mount.conf.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd"> + +<pam_mount> + <!-- Example using CIFS --> + <volume + fstype="cifs" + server="ucilnicesmb.fri1.uni-lj.si" + path="%(USER)" + mountpoint="~/" + options="sec=krb5i,cruid=%(USERUID)" + /> + <volume + fstype="cifs" + server="ucilnicesmb.fri1.uni-lj.si" + path="profiles/%(DOMAIN_USER).V6" + mountpoint="~/win_profile" + options="sec=krb5i,cruid=%(USERUID)" + /> +</pam_mount> diff --git a/roles/ad_joined/tasks/main_lin.yml b/roles/ad_joined/tasks/main_lin.yml index d1cadbb..2d9b02e 100644 --- a/roles/ad_joined/tasks/main_lin.yml +++ b/roles/ad_joined/tasks/main_lin.yml @@ -1,21 +1,35 @@ -- name: Enable create homedir on login - command: pam-auth-update --enable mkhomedir - become: true +- name: Install required packages + apt: + name: + - realmd + - sssd + - libpam-mount + - heimdal-clients + +- name: Remove krb5-user + apt: + name: + krb5-user + state: absent + +- name: Set OU + set_fact: + ou_path: "OU={{locations[0]}},OU=Ucilnice" + +- name: Show state + debug: + msg: "Host: {{inventory_hostname}}, OU: {{ou_path}}" + # - import_tasks: ne_sysprep.yaml + +- name: "Rename" + # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom + hostname: + name: "{{inventory_hostname}}" + register: hostname_res + - name: Check whether we already joined command: /bin/bash -c "/usr/sbin/realm list" register: realm_list_results - - name: Set OU - set_fact: - ou_path: "OU={{locations[0]}},OU=Ucilnice" - - name: Show state - debug: - msg: "Host: {{inventory_hostname}}, OU: {{ou_path}}" - # - import_tasks: ne_sysprep.yaml - - name: "Rename" - # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom - hostname: - name: "{{inventory_hostname}}" - register: hostname_res - name: Join using realmd expect: @@ -32,3 +46,20 @@ owner: root mode: 0600 +- name: Configure libpam-mount + copy: + src: pam_mount.conf.xml + dest: /etc/security/pam_mount.conf.xml + +- name: Enable libpam-mount + command: pam-auth-update --enable libpam-mount + become: true + +- name: Disable libpam-mkhomedir + command: pam-auth-update --disable mkhomedir + become: true + +- name: Restart sssd + service: + name: sssd + state: restarted diff --git a/roles/ad_joined/tasks/main_win.yml b/roles/ad_joined/tasks/main_win.yml index 79481e3..be252f9 100644 --- a/roles/ad_joined/tasks/main_win.yml +++ b/roles/ad_joined/tasks/main_win.yml @@ -1,18 +1,22 @@ - name: Set OU set_fact: ou_path: "OU={{locations[0]}},OU=Ucilnice,DC=fri1,DC=uni-lj,DC=si" + - name: "Rename" # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom win_hostname: name: "{{inventory_hostname}}" register: hostname_res + - name: "Reboot after hostname change" win_reboot: when: hostname_res.reboot_required + - name: Stop Windows Update Service win_service: name: wuauserv state: stopped + - name: Clear WSUS ID from registry win_regedit: path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate @@ -24,10 +28,12 @@ - AccountDomainSid - SusClientId - SusClientIDValidation + - name: Start Windows Update Service win_service: name: wuauserv state: started + - name: "Join domain" win_domain_membership: domain_admin_user: "{{adjoin_user}}" @@ -37,12 +43,15 @@ hostname: "{{inventory_hostname}}" state: domain register: domain_state + - name: Reset WSUS authorization win_command: wuauclt.exe /resetauthorization /detectnow ignore_errors: yes + - name: Update windows win_command: wuauclt.exe /updatenow ignore_errors: yes + - name: Reboot win_command: "shutdown /r" when: domain_state.reboot_required diff --git a/roles/ad_joined/templates/sssd.conf b/roles/ad_joined/templates/sssd.conf index 117793c..46c5c5b 100644 --- a/roles/ad_joined/templates/sssd.conf +++ b/roles/ad_joined/templates/sssd.conf @@ -29,3 +29,4 @@ ldap_id_mapping = True use_fully_qualified_names = True fallback_homedir = /home/%u@%d access_provider = ad +krb5_ccname_template = FILE:%d/krb5cc_%U From c5754dece28aa950f8181e9032a0e57baac900dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Mon, 1 Sep 2025 00:21:18 +0200 Subject: [PATCH 17/66] Do not mount cifs volumes for local users; disable debug --- roles/ad_joined/files/pam_mount.conf.xml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/roles/ad_joined/files/pam_mount.conf.xml b/roles/ad_joined/files/pam_mount.conf.xml index 01eb506..24167bc 100644 --- a/roles/ad_joined/files/pam_mount.conf.xml +++ b/roles/ad_joined/files/pam_mount.conf.xml @@ -3,18 +3,35 @@ <pam_mount> <!-- Example using CIFS --> + <debug enable="0" /> <volume fstype="cifs" server="ucilnicesmb.fri1.uni-lj.si" path="%(USER)" mountpoint="~/" options="sec=krb5i,cruid=%(USERUID)" - /> + > + <not> + <or> + <user>local_admin</user> + <user>root</user> + <sgrp>sudo</sgrp> + </or> + </not> + </volume> <volume fstype="cifs" server="ucilnicesmb.fri1.uni-lj.si" path="profiles/%(DOMAIN_USER).V6" mountpoint="~/win_profile" options="sec=krb5i,cruid=%(USERUID)" - /> + > + <not> + <or> + <user>local_admin</user> + <user>root</user> + <sgrp>sudo</sgrp> + </or> + </not> + </volume> </pam_mount> From 79293545d3749fe314161590d4ad98ec83bddd1b Mon Sep 17 00:00:00 2001 From: Timotej Lazar <timotej.lazar@fri.uni-lj.si> Date: Tue, 2 Sep 2025 09:52:37 +0200 Subject: [PATCH 18/66] Fix README formatting --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 907b298..512ba28 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ Ansible playbooks for deploying classroom computers. Run with something like: + ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py or, for Apple computers: + ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py From c15d6f1edf6eba4e9ed5ff999d33be3fa8396cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 10:46:21 +0200 Subject: [PATCH 19/66] =?UTF-8?q?Fix=20requirements=20by=20Ratko=20Pilipov?= =?UTF-8?q?i=C4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/DN-63260/meta/main.yml | 5 ++++- roles/NDN-63729/meta/main.yml | 8 ++++---- roles/cocotb/tasks/main.yml | 4 ++++ roles/cocotb/tasks/main_lin.yml | 4 ++++ roles/cocotb/tasks/main_win.yml | 2 ++ roles/iverilog/tasks/main.yml | 4 ++++ roles/iverilog/tasks/main_lin.yml | 4 ++++ roles/iverilog/tasks/main_win.yml | 6 ++++++ roles/surfer-project/tasks/main.yml | 4 ++++ roles/surfer-project/tasks/main_lin.yml | 17 +++++++++++++++++ roles/surfer-project/tasks/main_win.yml | 11 +++++++++++ 11 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 roles/cocotb/tasks/main.yml create mode 100644 roles/cocotb/tasks/main_lin.yml create mode 100644 roles/cocotb/tasks/main_win.yml create mode 100644 roles/iverilog/tasks/main.yml create mode 100644 roles/iverilog/tasks/main_lin.yml create mode 100644 roles/iverilog/tasks/main_win.yml create mode 100644 roles/surfer-project/tasks/main.yml create mode 100644 roles/surfer-project/tasks/main_lin.yml create mode 100644 roles/surfer-project/tasks/main_win.yml diff --git a/roles/DN-63260/meta/main.yml b/roles/DN-63260/meta/main.yml index aaa0ce9..c87e3ff 100644 --- a/roles/DN-63260/meta/main.yml +++ b/roles/DN-63260/meta/main.yml @@ -1,5 +1,8 @@ # Digitalno načrtovanje -# Nejc.Ilc@fri.uni-lj.si +# ratko.pilipovic@fri.uni-lj.si # Windows, Vivado 2022.1 dependencies: - role: vivado + - role: iverilog + - role: cocotb + - role: surfer-project diff --git a/roles/NDN-63729/meta/main.yml b/roles/NDN-63729/meta/main.yml index 12b4f3e..21edf8f 100644 --- a/roles/NDN-63729/meta/main.yml +++ b/roles/NDN-63729/meta/main.yml @@ -1,10 +1,10 @@ # Načrtovanje digitalnih naprav -# Miran.Koprivec@fri.uni-lj.si, Miha.Moskon@fri.uni-lj.si -# Windows, Vivado 2022.1 -# Načrtovanje digitalnih naprav -# Miha.Moskon@fri.uni-lj.si +# Miran.Koprivec@fri.uni-lj.si, Miha.Moskon@fri.uni-lj.si, ratko.pilipovic@fri.uni-lj.si # Windows, Vivado 2022.1 dependencies: - role: putty - role: vivado - role: cp2102_driver + - role: cocotb + - role: iverilog + - role: surfer-project diff --git a/roles/cocotb/tasks/main.yml b/roles/cocotb/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/cocotb/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/cocotb/tasks/main_lin.yml b/roles/cocotb/tasks/main_lin.yml new file mode 100644 index 0000000..94db275 --- /dev/null +++ b/roles/cocotb/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install Cocotb + pip: + executable: pipx + name: cocotb[bus] diff --git a/roles/cocotb/tasks/main_win.yml b/roles/cocotb/tasks/main_win.yml new file mode 100644 index 0000000..54148f4 --- /dev/null +++ b/roles/cocotb/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install cocoTB + win_command: pip install cocotb[bus] diff --git a/roles/iverilog/tasks/main.yml b/roles/iverilog/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/iverilog/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/iverilog/tasks/main_lin.yml b/roles/iverilog/tasks/main_lin.yml new file mode 100644 index 0000000..fc76453 --- /dev/null +++ b/roles/iverilog/tasks/main_lin.yml @@ -0,0 +1,4 @@ +- name: Install Icarus + apt: + name: iverilog + state: latest diff --git a/roles/iverilog/tasks/main_win.yml b/roles/iverilog/tasks/main_win.yml new file mode 100644 index 0000000..e190dea --- /dev/null +++ b/roles/iverilog/tasks/main_win.yml @@ -0,0 +1,6 @@ +- name: Install Icarus Verilog + win_chocolatey: + name: iverilog + version: '11.0' + source: http://internal/odata/repo + state: present diff --git a/roles/surfer-project/tasks/main.yml b/roles/surfer-project/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/surfer-project/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/surfer-project/tasks/main_lin.yml b/roles/surfer-project/tasks/main_lin.yml new file mode 100644 index 0000000..707d76c --- /dev/null +++ b/roles/surfer-project/tasks/main_lin.yml @@ -0,0 +1,17 @@ +# https://surfer-project.org/ +- name: create Surfer direcotry + file: + path: /opt/surfer + state: directory + +- name: Download and unpack Surfer + unarchive: + src: https://gitlab.com/api/v4/projects/42073614/jobs/artifacts/main/raw/surfer_linux.zip?job=linux_build + dest: /opt/surfer + remote_src: yes + +- name: Add symlink to /usr/local/bin + file: + src: /opt/surfer/surfer + path: /usr/local/bin/surfer + state: link diff --git a/roles/surfer-project/tasks/main_win.yml b/roles/surfer-project/tasks/main_win.yml new file mode 100644 index 0000000..fd75ce3 --- /dev/null +++ b/roles/surfer-project/tasks/main_win.yml @@ -0,0 +1,11 @@ +- name: Download Surfer + win_get_url: + dest: "{{ large_prog_dir }}" + url: https://gitlab.com/api/v4/projects/42073614/jobs/artifacts/main/raw/surfer_win.zip?job=windows_build + register: downloaded_surfer + +- name: Unpack Surfer + win_unzip: + src: "{{ downloaded_surfer['dest']}}" + dest: "{{ large_prog_dir }}" + delete_archive: yes From 0d1e32c6265d987fecf0bf815e9b4dc174536545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 10:46:52 +0200 Subject: [PATCH 20/66] =?UTF-8?q?Fix=20path=20according=20to=20Marko=20Po?= =?UTF-8?q?=C5=BEenel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/jdk/tasks/main_win.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/jdk/tasks/main_win.yml b/roles/jdk/tasks/main_win.yml index 4aad6a4..27cf8c2 100644 --- a/roles/jdk/tasks/main_win.yml +++ b/roles/jdk/tasks/main_win.yml @@ -28,6 +28,13 @@ state: present scope: machine +- name: Java bin dir "." to PATH + win_path: + name: PATH + elements: "{{ reg['raw_value'] }}\\bin" + state: present + scope: machine + - name: Disable Java updates win_regedit: path: HKLM:\SOFTWARE\WOW6432Node\JavaSoft\Java Update\Policy From 93b01e5d530ebab6fa814997dbb76a1447b704a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 11:22:49 +0200 Subject: [PATCH 21/66] Fix / extend README --- README.md | 35 +++- roles/ad_joined/tasks/main_lin.yml | 4 +- roles/ad_joined/tasks/main_win.yml | 4 +- roles/eclipse/tasks/main_win.yml | 2 +- roles/matlab/tasks/main_win.yml | 2 +- roles/pycharm/tasks/main_win.yml | 2 +- roles/sifive/tasks/main_win.yml | 8 +- roles/stm32duino/tasks/main_win.yml | 4 +- roles/xampp/tasks/main_win.yml | 3 +- setup.yml | 10 +- unattended_install/win/autounattend.xml | 225 ++++++++++++++++++++++-- 11 files changed, 267 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 512ba28..9902f4b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,40 @@ +# Using the ansible scripts + Ansible playbooks for deploying classroom computers. Run with something like: ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py or, for Apple computers: - ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py + +# How classroom computers are prepared at FRI + +The computers are prepared as follows: + - Ask teachers to check their requirements. + - Fix ansible scripts according to the requirements. + - Set up a fresh Windows and Linux install on a VM. + - Use ansible to deploy the software, fixing fresh bugs due to changes in the install processes along the way. + - Fix root filesystem UUIDs to what they were last year so the network-booted menu still works. + - Create partition table image and partition images using [FRI Backup](https://github.com/UL-FRI/ansible_classroom_deploy/tree/main/fri_backup). + - Deploy the images on separate VMs - one for Linux, one for Windows. + - Have teachers check their software in the VMs, report any problems. + - Fix problems on the VMs. + - Create partition images for Windows on one VM, for Linux on the other. + - Deploy the images on a limited number of computers in the classrooms using FRI Backup. + - Test the newly deployed computers, fix identified problems on the VMs. + - Join the Linux VM into AD. One AD account is used for all computers. + - Deploy the partition tables and partitions to the classrooms using [custom ansible scripts](https://github.com/UL-FRI/ansible_classroom_deploy/tree/main/polz_scripts) running FRI Backup and [UDPCast](https://www.udpcast.linux.lu/cmd.html). + - Join Windows into AD. + +# Immutable computers + +Some pieces of modern software assume that a computer is only used by one user who has practically unlimited space in their home folder. Examples of such software are Android Studio, Visual Studio Code, Matlab, Windows Subsystem for Linux (WSUS) and others. Instead of trying to get the software to work, we might just give up and have everyone use the same account on each computer, then wipe all data after they log out / reboot. + +## Windows + +We intend to use [UWF](https://learn.microsoft.com/en-us/windows/configuration/wcd/wcd-unifiedwritefilter). + +## Linux + +We intend to use [snapper](https://wiki.archlinux.org/title/Snapper). + diff --git a/roles/ad_joined/tasks/main_lin.yml b/roles/ad_joined/tasks/main_lin.yml index 2d9b02e..fce6850 100644 --- a/roles/ad_joined/tasks/main_lin.yml +++ b/roles/ad_joined/tasks/main_lin.yml @@ -24,7 +24,7 @@ - name: "Rename" # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom hostname: - name: "{{inventory_hostname}}" + name: "{{inventory_hostname}}-linux" register: hostname_res - name: Check whether we already joined @@ -33,7 +33,7 @@ - name: Join using realmd expect: - command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} FRI1.UNI-LJ.SI + command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} {{domain_name}} responses: (?i)Password: "{{ad_join_password}}" ignore_errors: yes diff --git a/roles/ad_joined/tasks/main_win.yml b/roles/ad_joined/tasks/main_win.yml index be252f9..f2de3a9 100644 --- a/roles/ad_joined/tasks/main_win.yml +++ b/roles/ad_joined/tasks/main_win.yml @@ -36,8 +36,8 @@ - name: "Join domain" win_domain_membership: - domain_admin_user: "{{adjoin_user}}" - domain_admin_password: "{{adjoin_password}}" + domain_admin_user: "{{ad_join_user}}" + domain_admin_password: "{{ad_join_password}}" dns_domain_name: "{{domain_name}}" domain_ou_path: "{{ou_path}}" hostname: "{{inventory_hostname}}" diff --git a/roles/eclipse/tasks/main_win.yml b/roles/eclipse/tasks/main_win.yml index 5e39d7c..f26c809 100644 --- a/roles/eclipse/tasks/main_win.yml +++ b/roles/eclipse/tasks/main_win.yml @@ -12,4 +12,4 @@ win_lineinfile: path: "%ProgramFiles%\\Eclipse {{ target_version }}\\eclipse\\eclipse.ini" regexp: "osgi.instance.area.default" - line: "-Dosgi.instance.area.default=H:/Documents/eclipse-workspace" + line: "-Dosgi.instance.area.default=D:/Documents/eclipse-workspace" diff --git a/roles/matlab/tasks/main_win.yml b/roles/matlab/tasks/main_win.yml index e0cddc2..4fd79ff 100644 --- a/roles/matlab/tasks/main_win.yml +++ b/roles/matlab/tasks/main_win.yml @@ -2,7 +2,7 @@ set_fact: target_version: "R2025a_Update_1" license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic - dest_dir: C:\matlab + dest_dir: "{{ large_prog_dir }}\\matlab" - name: Set ISO path set_fact: diff --git a/roles/pycharm/tasks/main_win.yml b/roles/pycharm/tasks/main_win.yml index ae51dbd..2b4516a 100644 --- a/roles/pycharm/tasks/main_win.yml +++ b/roles/pycharm/tasks/main_win.yml @@ -8,4 +8,4 @@ state: upgrade version: "{{ target_version }}" -# TODO set default project directory to H:\something +# TODO set default project directory to {{large_prog_dir}}\something diff --git a/roles/sifive/tasks/main_win.yml b/roles/sifive/tasks/main_win.yml index 1030ce1..e874141 100644 --- a/roles/sifive/tasks/main_win.yml +++ b/roles/sifive/tasks/main_win.yml @@ -5,7 +5,7 @@ - name: Set SiFive Studio install location set_fact: - download_filedest: C:\FreedomStudio-4.18.0.2021-04-1-x86_64-w64-mingw32.zip + download_filedest: "{{ large_prog_dir }}\\FreedomStudio-4.18.0.2021-04-1-x86_64-w64-mingw32.zip" - name: Download SiFive win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/bulic_fri1_uni-lj_si/EdiSnJpoClJLtc3AtcAtEQ4BI76_PeDvL-ZmhxG4OEyvig?e=xBRYcb&download=1" -O "{{ download_filedest }}" args: @@ -14,12 +14,12 @@ - name: Unzip SiFive Studio win_unzip: src: "{{ download_filedest }}" - dest: C:\SiFive\ - creates: C:\SiFive\plugins + dest: "{{ large_prog_dir }}\\SiFive\\" + creates: "{{ large_prog_dir }}\\SiFive\\plugins" delete_archive: yes - name: Create desktop shortcut win_shortcut: description: "SiFive Freedom Studio" - src: C:\SiFive\FreedomStudio.exe + src: "{{ large_prog_dir }}\\SiFive\\FreedomStudio.exe" dest: '%public%\Desktop\SiFive.lnk' diff --git a/roles/stm32duino/tasks/main_win.yml b/roles/stm32duino/tasks/main_win.yml index 6779104..cc9fe81 100644 --- a/roles/stm32duino/tasks/main_win.yml +++ b/roles/stm32duino/tasks/main_win.yml @@ -10,13 +10,13 @@ - name: Create STM32Duino directory win_file: - path: "D:\\RAVINOR\\STM32Duino" + path: "{{large_prog_dir}}\\RAVINOR\\STM32Duino" state: directory - name: Install preinstalled STM32Duino & Arduino environment win_get_url: url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ" - dest: "D:\\RAVINOR\\STM32Duino" + dest: "{{large_prog_dir}}\\RAVINOR\\STM32Duino" # TODO Don't know if unzipping is required? diff --git a/roles/xampp/tasks/main_win.yml b/roles/xampp/tasks/main_win.yml index 44bbc71..154de4a 100644 --- a/roles/xampp/tasks/main_win.yml +++ b/roles/xampp/tasks/main_win.yml @@ -1,6 +1,7 @@ - name: Install XAMPP win_chocolatey: name: xampp-81 + install_args: "" - name: Make XAMPP config world writable win_acl: @@ -12,7 +13,7 @@ - name: Add firewall rules for XAMPP win_firewall_rule: name: "Allow inbound traffic for XAMPP: {{ item }}" - program: "%SystemDrive%\\xampp\\{{ item }}" + program: "C:\\xampp\\{{ item }}" action: allow direction: in protocol: tcp diff --git a/setup.yml b/setup.yml index aeaa82b..5596e87 100644 --- a/setup.yml +++ b/setup.yml @@ -13,8 +13,16 @@ debugger: on_failed vars_files: - vars/software_keys.yml + - vars/dirs.yml roles: - - all_classes + # - all_classes + # - fri_base + - android_studio + # - jdk + # - powerdesigner + # - solidworks + # + # - omnetpp # - stm32cube # - processing # - powerdesigner diff --git a/unattended_install/win/autounattend.xml b/unattended_install/win/autounattend.xml index bfb33fe..6ee0db5 100644 --- a/unattended_install/win/autounattend.xml +++ b/unattended_install/win/autounattend.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"> - <!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000424&Locale2=de-DE&Keyboard2=00140c00&Locale3=es-ES&Keyboard3=00140c00&GeoLocation=212&ProcessorArchitecture=amd64&BypassNetworkCheck=true&ComputerNameMode=Custom&ComputerName=ucilnica&ComputerNameScript=return+%27DESKTOP-%7B0%3AD3%7D%27+-f+%28+Get-Random+-Minimum+0+-Maximum+999+%29%3B&CompactOsMode=Default&TimeZoneMode=Explicit&TimeZone=Central+Europe+Standard+Time&PartitionLayout=GPT&EspSize=300&RecoveryMode=Partition&RecoverySize=1000&PartitionMode=Custom&DiskpartScript=REM&InstallToMode=Custom&InstallToDisk=0&InstallToPartition=3&DiskAssertionMode=Skip&DiskAssertionScript=On+Error+Resume+Next%0D%0ASet+wmi+%3D+GetObject%28%22winmgmts%3A%5C%5C.%5Croot%5Ccimv2%22%29%0D%0ASet+drive+%3D+wmi.Get%28%22Win32_DiskDrive.DeviceID%3D%27%5C%5C.%5CPHYSICALDRIVE0%27%22%29%0D%0AIf+Err.Number+%3C%3E+0+Then%0D%0A++++Msgbox+Err.Description%0D%0A++++WScript.Quit+1%0D%0AEnd+If%0D%0AIf+drive.InterfaceType+%3D+%22IDE%22+Or+drive.InterfaceType+%3D+%22SCSI%22+Then%0D%0A++++WScript.Quit+0%0D%0AElse%0D%0A++++MsgBox+%22Assertion+failed.%22%0D%0A++++WScript.Quit+1%0D%0AEnd+If&WindowsEditionMode=Generic&WindowsEdition=education&ProductKey=VK7JG-NPHTM-C97JM-9MPGT-3V66T&InstallFromMode=Automatic&InstallFromIndex=1&InstallFromName=Windows+11+Pro&InstallFromDescription=Windows+11+Pro&PEMode=Default&PEScript=%40for+%25%25d+in+%28D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+T+U+V+W+Y+Z%29+do+%40%28%0D%0A++++if+exist+%25%25d%3A%5Csources%5Cinstall.wim+set+%22IMAGE_FILE%3D%25%25d%3A%5Csources%5Cinstall.wim%22%0D%0A++++if+exist+%25%25d%3A%5Csources%5Cinstall.esd+set+%22IMAGE_FILE%3D%25%25d%3A%5Csources%5Cinstall.esd%22%0D%0A++++if+exist+%25%25d%3A%5Csources%5Cinstall.swm+set+%22IMAGE_FILE%3D%25%25d%3A%5Csources%5Cinstall.swm%22+%26+set+%22SWM_PARAM%3D%2FSWMFile%3A%25%25d%3A%5Csources%5Cinstall*.swm%22%0D%0A++++if+exist+%25%25d%3A%5Cautounattend.xml+set+%22XML_FILE%3D%25%25d%3A%5Cautounattend.xml%22%0D%0A%29%0D%0A%0D%0A%40if+not+defined+IMAGE_FILE+echo+Could+not+locate+install.wim%2C+install.esd+or+install.swm.+%26+pause+%26+exit+%2Fb+1%0D%0A%40if+not+defined+XML_FILE+echo+Could+not+locate+autounattend.xml.+%26+pause+%26+exit+%2Fb+1%0D%0A%0D%0A%3E%3EX%3A%5Cdiskpart.txt+%28%0D%0A++++echo+SELECT+DISK%3D0%0D%0A++++echo+CLEAN%0D%0A++++echo+CONVERT+GPT%0D%0A++++echo+CREATE+PARTITION+EFI+SIZE%3D300%0D%0A++++echo+FORMAT+QUICK+FS%3DFAT32+LABEL%3D%22System%22%0D%0A++++echo+ASSIGN+LETTER%3DS%0D%0A++++echo+CREATE+PARTITION+MSR+SIZE%3D16%0D%0A++++echo+CREATE+PARTITION+PRIMARY%0D%0A++++echo+FORMAT+QUICK+FS%3DNTFS+LABEL%3D%22Windows%22%0D%0A++++echo+ASSIGN+LETTER%3DC%0D%0A%29%0D%0A%0D%0Adiskpart.exe+%2Fs+X%3A%5Cdiskpart.txt+%7C%7C+%28+echo+diskpart.exe+encountered+an+error.+%26+pause+%26+exit+%2Fb+1+%29%0D%0A%0D%0Adism.exe+%2FApply-Image+%2FImageFile%3A%25IMAGE_FILE%25+%25SWM_PARAM%25+%2FName%3A%22Windows+11+Pro%22+%2FApplyDir%3AC%3A%5C+%7C%7C+%28+echo+dism.exe+encountered+an+error.+%26+pause+%26+exit+%2Fb+1+%29%0D%0A%0D%0Abcdboot.exe+C%3A%5CWindows+%2Fs+S%3A+%7C%7C+%28+echo+bcdboot.exe+encountered+an+error.+%26+pause+%26+exit+%2Fb+1+%29%0D%0A%0D%0Amkdir+C%3A%5CWindows%5CPanther%0D%0Acopy+%25XML_FILE%25+C%3A%5CWindows%5CPanther%5Cunattend.xml%0D%0Acopy+%25XML_FILE%25+C%3A%5CWindows%5CPanther%5Cunattend-original.xml%0D%0A%0D%0Arem+Avoid+creation+of+recovery+partition%0D%0Adel+C%3A%5CWindows%5CSystem32%5CRecovery%5Cwinre.wim%0D%0A%0D%0Arem+Disable+8.3+file+names%0D%0Afsutil.exe+8dot3name+set+C%3A+1%0D%0Afsutil.exe+8dot3name+strip+%2Fs+%2Ff+C%3A%5C%0D%0A%0D%0Arem+Disable+Windows+Defender%0D%0Areg.exe+LOAD+HKLM%5Cmount+C%3A%5CWindows%5CSystem32%5Cconfig%5CSYSTEM%0D%0Afor+%25%25s+in+%28Sense+WdBoot+WdFilter+WdNisDrv+WdNisSvc+WinDefend%29+do+reg.exe+ADD+HKLM%5Cmount%5CControlSet001%5CServices%5C%25%25s+%2Fv+Start+%2Ft+REG_DWORD+%2Fd+4+%2Ff%0D%0Areg.exe+UNLOAD+HKLM%5Cmount%0D%0A%0D%0Awpeutil.exe+reboot&UserAccountMode=Unattended&AccountName0=local_admin&AccountDisplayName0=FRI+IT&AccountPassword0=6tfc5rdx&AccountGroup0=Administrators&AccountName1=Student&AccountDisplayName1=Student&AccountPassword1=vaje&AccountGroup1=Users&AccountName2=&AccountDisplayName2=&AccountPassword2=&AccountGroup2=Users&AccountName3=&AccountDisplayName3=&AccountPassword3=&AccountGroup3=Users&AccountName4=&AccountDisplayName4=&AccountPassword4=&AccountGroup4=Users&AutoLogonMode=Own&BuiltinAdministratorPassword=&PasswordExpirationMode=Unlimited&PasswordMaxAge=42&LockoutMode=Default&LockoutThreshold=10&LockoutWindow=10&LockoutDuration=10&HideFiles=Hidden&ShowFileExtensions=true&LaunchToThisPC=true&TaskbarSearch=Box&TaskbarIconsMode=Default&TaskbarIconsXml=%3CLayoutModificationTemplate+xmlns%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FLayoutModification%22+xmlns%3Adefaultlayout%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FFullDefaultLayout%22+xmlns%3Astart%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FStartLayout%22+xmlns%3Ataskbar%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FTaskbarLayout%22+Version%3D%221%22%3E%0D%0A++%3CCustomTaskbarLayoutCollection+PinListPlacement%3D%22Replace%22%3E%0D%0A++++%3Cdefaultlayout%3ATaskbarLayout%3E%0D%0A++++++%3Ctaskbar%3ATaskbarPinList%3E%0D%0A++++++++%3Ctaskbar%3ADesktopApp+DesktopApplicationID%3D%22Microsoft.Windows.Explorer%22+%2F%3E%0D%0A++++++++%3Ctaskbar%3AUWA+AppUserModelID%3D%22windows.immersivecontrolpanel_cw5n1h2txyewy%21microsoft.windows.immersivecontrolpanel%22+%2F%3E%0D%0A++++++++%3Ctaskbar%3ADesktopApp+DesktopApplicationLinkPath%3D%22%25APPDATA%25%5CMicrosoft%5CWindows%5CStart+Menu%5CPrograms%5CWindows+PowerShell%5CWindows+PowerShell.lnk%22+%2F%3E%0D%0A++++++%3C%2Ftaskbar%3ATaskbarPinList%3E%0D%0A++++%3C%2Fdefaultlayout%3ATaskbarLayout%3E%0D%0A++%3C%2FCustomTaskbarLayoutCollection%3E%0D%0A%3C%2FLayoutModificationTemplate%3E&StartTilesMode=Default&StartTilesXml=%3CLayoutModificationTemplate+xmlns%3Adefaultlayout%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FFullDefaultLayout%22+xmlns%3Astart%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FStartLayout%22+Version%3D%221%22+xmlns%3D%22http%3A%2F%2Fschemas.microsoft.com%2FStart%2F2014%2FLayoutModification%22%3E%0D%0A++%3CLayoutOptions+StartTileGroupCellWidth%3D%226%22+%2F%3E%0D%0A++%3CDefaultLayoutOverride%3E%0D%0A++++%3CStartLayoutCollection%3E%0D%0A++++++%3Cdefaultlayout%3AStartLayout+GroupCellWidth%3D%226%22%3E%0D%0A++++++++%3Cstart%3AGroup+Name%3D%22%22%3E%0D%0A++++++++++%3Cstart%3ATile+Size%3D%222x2%22+Column%3D%224%22+Row%3D%220%22+AppUserModelID%3D%22windows.immersivecontrolpanel_cw5n1h2txyewy%21microsoft.windows.immersivecontrolpanel%22+%2F%3E%0D%0A++++++++++%3Cstart%3ADesktopApplicationTile+Size%3D%222x2%22+Column%3D%220%22+Row%3D%220%22+DesktopApplicationLinkPath%3D%22%25ALLUSERSPROFILE%25%5CMicrosoft%5CWindows%5CStart+Menu%5CPrograms%5CMicrosoft+Edge.lnk%22+%2F%3E%0D%0A++++++++++%3Cstart%3ADesktopApplicationTile+Size%3D%222x2%22+Column%3D%222%22+Row%3D%220%22+DesktopApplicationLinkPath%3D%22%25APPDATA%25%5CMicrosoft%5CWindows%5CStart+Menu%5CPrograms%5CSystem+Tools%5CFile+Explorer.lnk%22+%2F%3E%0D%0A++++++++%3C%2Fstart%3AGroup%3E%0D%0A++++++%3C%2Fdefaultlayout%3AStartLayout%3E%0D%0A++++%3C%2FStartLayoutCollection%3E%0D%0A++%3C%2FDefaultLayoutOverride%3E%0D%0A%3C%2FLayoutModificationTemplate%3E&StartPinsMode=Default&StartPinsJson=%7B%0D%0A++%22pinnedList%22%3A+%5B%0D%0A++++%7B%0D%0A++++++%22desktopAppLink%22%3A+%22%25ALLUSERSPROFILE%25%5C%5CMicrosoft%5C%5CWindows%5C%5CStart+Menu%5C%5CPrograms%5C%5CMicrosoft+Edge.lnk%22%0D%0A++++%7D%2C%0D%0A++++%7B%0D%0A++++++%22desktopAppLink%22%3A+%22%25APPDATA%25%5C%5CMicrosoft%5C%5CWindows%5C%5CStart+Menu%5C%5CPrograms%5C%5CFile+Explorer.lnk%22%0D%0A++++%7D%2C%0D%0A++++%7B%0D%0A++++++%22packagedAppId%22%3A+%22windows.immersivecontrolpanel_cw5n1h2txyewy%21microsoft.windows.immersivecontrolpanel%22%0D%0A++++%7D%0D%0A++%5D%0D%0A%7D&DisableFastStartup=true&EnableRemoteDesktop=true&PreventDeviceEncryption=true&EffectsMode=Default&DesktopIconsMode=Default&StartFoldersMode=Default&VirtIoGuestTools=true&WifiMode=Skip&WifiName=&WifiAuthentication=Open&WifiPassword=00000000&WifiProfileXml=%3CWLANProfile+xmlns%3D%22http%3A%2F%2Fwww.microsoft.com%2Fnetworking%2FWLAN%2Fprofile%2Fv1%22%3E%0D%0A++%3Cname%3EWLAN-123456%3C%2Fname%3E%0D%0A++%3CSSIDConfig%3E%0D%0A++++%3CSSID%3E%0D%0A++++++%3Chex%3E574C414E2D313233343536%3C%2Fhex%3E%0D%0A++++++%3Cname%3EWLAN-123456%3C%2Fname%3E%0D%0A++++%3C%2FSSID%3E%0D%0A++++%3CnonBroadcast%3Etrue%3C%2FnonBroadcast%3E%0D%0A++%3C%2FSSIDConfig%3E%0D%0A++%3CconnectionType%3EESS%3C%2FconnectionType%3E%0D%0A++%3CconnectionMode%3Eauto%3C%2FconnectionMode%3E%0D%0A++%3CMSM%3E%0D%0A++++%3Csecurity%3E%0D%0A++++++%3CauthEncryption%3E%0D%0A++++++++%3Cauthentication%3EWPA3SAE%3C%2Fauthentication%3E%0D%0A++++++++%3Cencryption%3EAES%3C%2Fencryption%3E%0D%0A++++++++%3CuseOneX%3Efalse%3C%2FuseOneX%3E%0D%0A++++++++%3CtransitionMode+xmlns%3D%22http%3A%2F%2Fwww.microsoft.com%2Fnetworking%2FWLAN%2Fprofile%2Fv4%22%3Etrue%3C%2FtransitionMode%3E%0D%0A++++++%3C%2FauthEncryption%3E%0D%0A++++++%3CsharedKey%3E%0D%0A++++++++%3CkeyType%3EpassPhrase%3C%2FkeyType%3E%0D%0A++++++++%3Cprotected%3Efalse%3C%2Fprotected%3E%0D%0A++++++++%3CkeyMaterial%3Epassword%3C%2FkeyMaterial%3E%0D%0A++++++%3C%2FsharedKey%3E%0D%0A++++%3C%2Fsecurity%3E%0D%0A++%3C%2FMSM%3E%0D%0A%3C%2FWLANProfile%3E&ExpressSettings=DisableAll&KeysMode=Skip&CapsLockInitial=Off&CapsLockBehavior=Toggle&NumLockInitial=Off&NumLockBehavior=Toggle&ScrollLockInitial=Off&ScrollLockBehavior=Toggle&StickyKeysMode=Default&ColorMode=Default&SystemColorTheme=Light&AppsColorTheme=Light&AccentColor=%230078d4&WallpaperMode=Default&WallpaperColor=%23008080&WallpaperScript=%23+Photo+by+Martin+Damboldt%3A+https%3A%2F%2Fwww.pexels.com%2Fphoto%2Fgray-bridge-and-trees-814499%2F%0D%0A%24url+%3D+%27https%3A%2F%2Fimages.pexels.com%2Fphotos%2F814499%2Fpexels-photo-814499.jpeg%27%3B%0D%0Areturn+%28+Invoke-WebRequest+-Uri+%24url+-UseBasicParsing+-TimeoutSec+30+%29.Content%3B&LockScreenMode=Default&LockScreenScript=foreach%28+%24drive+in+%5BSystem.IO.DriveInfo%5D%3A%3AGetDrives%28%29+%29+%7B%0D%0A++++if%28+%24found+%3D+Join-Path+-Path+%24drive.RootDirectory+-ChildPath+%27lockscreen.png%27+-Resolve+-ErrorAction+%27SilentlyContinue%27+%29+%7B%0D%0A++++++++return+%5BSystem.IO.File%5D%3A%3AReadAllBytes%28+%24found+%29%3B%0D%0A++++%7D%0D%0A%7D%0D%0A%27Cannot+find+any+files+that+match+pattern.%27+%7C+Write-Warning%3B&SystemScript0=Get-WindowsCapability+-Name+OpenSSH.Server*+-Online+%7C%0D%0A++++Add-WindowsCapability+-Online%0D%0A%0D%0A%24firewallParams+%3D+%40%7B%0D%0A++++Name++++++++%3D+%27sshd-Server-In-TCP%27%0D%0A++++DisplayName+%3D+%27Inbound+rule+for+OpenSSH+Server+%28sshd%29+on+TCP+port+22%27%0D%0A++++Action++++++%3D+%27Allow%27%0D%0A++++Direction+++%3D+%27Inbound%27%0D%0A++++Enabled+++++%3D+%27True%27++%23+This+is+not+a+boolean+but+an+enum%0D%0A++++Profile+++++%3D+%27Any%27%0D%0A++++Protocol++++%3D+%27TCP%27%0D%0A++++LocalPort+++%3D+22%0D%0A%7D%0D%0ANew-NetFirewallRule+%40firewallParams%0D%0A%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+++++++++%3D+%27HKLM%3A%5CSOFTWARE%5COpenSSH%27%0D%0A++++Name+++++++++%3D+%27DefaultShell%27%0D%0A++++Value++++++++%3D+%27C%3A%5CWindows%5CSystem32%5CWindowsPowerShell%5Cv1.0%5Cpowershell.exe%27%0D%0A++++PropertyType+%3D+%27String%27%0D%0A++++Force++++++++%3D+%24true%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%23+Set+default+to+powershell.exe%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+++++++++%3D+%27HKLM%3A%5CSOFTWARE%5COpenSSH%27%0D%0A++++Name+++++++++%3D+%27DefaultShell%27%0D%0A++++Value++++++++%3D+%27C%3A%5CWindows%5CSystem32%5CWindowsPowerShell%5Cv1.0%5Cpowershell.exe%27%0D%0A++++PropertyType+%3D+%27String%27%0D%0A++++Force++++++++%3D+%24true%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%23+Set+time+to+UTC%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+++++++++%3D+%27HKLM%3A%5CSYSTEM%5CCurrentControlSet%5CControl%5CTimeZoneInformation%27%0D%0A++++Name+++++++++%3D+%27RealTimeIsUniversal%27%0D%0A++++Value++++++++%3D+%2700000001%27%0D%0A++++PropertyType+%3D+%27dword%27%0D%0A++++Force++++++++%3D+%24true%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%0D%0ASet-Service+-Name+sshd+-StartupType+Automatic+-Status+Running&SystemScriptType0=Ps1&SystemScript1=&SystemScriptType1=Reg&SystemScript2=&SystemScriptType2=Ps1&SystemScript3=&SystemScriptType3=Reg&SystemScript4=&SystemScriptType4=Vbs&DefaultUserScript0=&DefaultUserScriptType0=Reg&DefaultUserScript1=&DefaultUserScriptType1=Cmd&DefaultUserScript2=&DefaultUserScriptType2=Ps1&FirstLogonScript0=&FirstLogonScriptType0=Cmd&FirstLogonScript1=Set-Service+-Name+sshd+-StartupType+Automatic+-Status+Running&FirstLogonScriptType1=Ps1&FirstLogonScript2=&FirstLogonScriptType2=Reg&FirstLogonScript3=&FirstLogonScriptType3=Vbs&UserOnceScript0=&UserOnceScriptType0=Cmd&UserOnceScript1=&UserOnceScriptType1=Ps1&UserOnceScript2=&UserOnceScriptType2=Reg&UserOnceScript3=&UserOnceScriptType3=Vbs&WdacMode=Skip&WdacAuditMode=AuditingOnBootFailure&WdacScriptMode=Restricted&ComponentContent0=&Component0=&ComponentContent1=&Component1=&ComponentContent2=&Component2=--> + <!--https://schneegans.de/windows/unattend-generator/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000424&UseKeyboard2=true&Locale2=en-US&Keyboard2=00000409&GeoLocation=212&ProcessorArchitecture=amd64&BypassNetworkCheck=true&ComputerNameMode=Custom&ComputerName=ucilnica&CompactOsMode=Default&TimeZoneMode=Implicit&PartitionMode=Custom&DiskpartScript=REM&InstallToMode=Custom&InstallToDisk=0&InstallToPartition=3&DiskAssertionMode=Skip&WindowsEditionMode=Generic&WindowsEdition=education&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AccountName0=local_admin&AccountDisplayName0=FRI+IT&AccountPassword0=6tfc5rdx&AccountGroup0=Administrators&AccountName1=Student&AccountDisplayName1=Student&AccountPassword1=vaje&AccountGroup1=Users&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=Hidden&ShowFileExtensions=true&LaunchToThisPC=true&TaskbarSearch=Box&TaskbarIconsMode=Default&DisableWidgets=true&StartTilesMode=Default&StartPinsMode=Default&DisableFastStartup=true&EnableRemoteDesktop=true&HardenSystemDriveAcl=true&PreventDeviceEncryption=true&EffectsMode=Default&DesktopIconsMode=Default&StartFoldersMode=Default&VirtIoGuestTools=true&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Default&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&Remove3DViewer=true&RemoveBingSearch=true&RemoveCalculator=true&RemoveCamera=true&RemoveClock=true&RemoveCopilot=true&RemoveCortana=true&RemoveDevHome=true&RemoveFamily=true&RemoveFeedbackHub=true&RemoveGameAssist=true&RemoveHandwriting=true&RemoveInternetExplorer=true&RemoveMaps=true&RemoveMathInputPanel=true&RemoveMixedReality=true&RemoveNews=true&RemoveOffice365=true&RemoveOneSync=true&RemovePaint=true&RemovePhotos=true&RemovePowerAutomate=true&RemovePowerShellISE=true&RemoveQuickAssist=true&RemoveRecall=true&RemoveRdpClient=true&RemoveSkype=true&RemoveSolitaire=true&RemoveSpeech=true&RemoveStepsRecorder=true&RemoveStickyNotes=true&RemoveGetStarted=true&RemoveToDo=true&RemoveWallet=true&RemoveFaxAndScan=true&RemoveWindowsHello=true&RemoveWordPad=true&RemoveYourPhone=true&SystemScript0=Get-WindowsCapability+-Name+OpenSSH.Server*+-Online+%7C%0D%0A++++Add-WindowsCapability+-Online%0D%0A%0D%0A%24firewallParams+%3D+%40%7B%0D%0A++++Name++++++++%3D+%27sshd-Server-In-TCP%27%0D%0A++++DisplayName+%3D+%27Inbound+rule+for+OpenSSH+Server+%28sshd%29+on+TCP+port+22%27%0D%0A++++Action++++++%3D+%27Allow%27%0D%0A++++Direction+++%3D+%27Inbound%27%0D%0A++++Enabled+++++%3D+%27True%27++%23+This+is+not+a+boolean+but+an+enum%0D%0A++++Profile+++++%3D+%27Any%27%0D%0A++++Protocol++++%3D+%27TCP%27%0D%0A++++LocalPort+++%3D+22%0D%0A%7D%0D%0ANew-NetFirewallRule+%40firewallParams%0D%0A%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+++++++++%3D+%27HKLM%3A%5CSOFTWARE%5COpenSSH%27%0D%0A++++Name+++++++++%3D+%27DefaultShell%27%0D%0A++++Value++++++++%3D+%27C%3A%5CWindows%5CSystem32%5CWindowsPowerShell%5Cv1.0%5Cpowershell.exe%27%0D%0A++++PropertyType+%3D+%27String%27%0D%0A++++Force++++++++%3D+%24true%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%23+Set+default+to+powershell.exe%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+++++++++%3D+%27HKLM%3A%5CSOFTWARE%5COpenSSH%27%0D%0A++++Name+++++++++%3D+%27DefaultShell%27%0D%0A++++Value++++++++%3D+%27C%3A%5CWindows%5CSystem32%5CWindowsPowerShell%5Cv1.0%5Cpowershell.exe%27%0D%0A++++PropertyType+%3D+%27String%27%0D%0A++++Force++++++++%3D+%24true%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%23+Set+real-time+clock+to+UTC%0D%0A%24shellParams+%3D+%40%7B%0D%0A++++Path+%3D+%27HKLM%3A%5CSYSTEM%5CCurrentControlSet%5CControl%5CTimeZoneInformation%27%0D%0A++++Name+%3D+%27RealTimeIsUniversal%27%0D%0A++++Value+%3D+%271%27%0D%0A++++PropertyType+%3D+%27DWord%27%0D%0A%7D%0D%0ANew-ItemProperty+%40shellParams%0D%0A%0D%0A%0D%0ASet-Service+-Name+sshd+-StartupType+Automatic+-Status+Running&SystemScriptType0=Ps1&WdacMode=Skip--> <settings pass="offlineServicing"></settings> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> <SetupUILanguage> <UILanguage>en-US</UILanguage> </SetupUILanguage> - <InputLocale>0409:00000424</InputLocale> + <InputLocale>0409:00000424;0409:00000409</InputLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> <UserLocale>en-US</UserLocale> @@ -45,7 +45,6 @@ <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> <ComputerName>ucilnica</ComputerName> - <TimeZone>Central Europe Standard Time</TimeZone> </component> <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> <RunSynchronous> @@ -76,7 +75,7 @@ <settings pass="auditUser"></settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> - <InputLocale>0409:00000424</InputLocale> + <InputLocale>0409:00000424;0409:00000409</InputLocale> <SystemLocale>en-US</SystemLocale> <UILanguage>en-US</UILanguage> <UserLocale>en-US</UserLocale> @@ -145,6 +144,183 @@ foreach( $file in $Document.unattend.Extensions.File ) { [System.IO.File]::WriteAllBytes( $path, $bytes ); } </ExtractScript> + <File path="C:\Windows\Setup\Scripts\RemovePackages.ps1"> +$selectors = @( + 'Microsoft.Microsoft3DViewer'; + 'Microsoft.BingSearch'; + 'Microsoft.WindowsCalculator'; + 'Microsoft.WindowsCamera'; + 'Microsoft.WindowsAlarms'; + 'Microsoft.549981C3F5F10'; + 'Microsoft.Windows.DevHome'; + 'MicrosoftCorporationII.MicrosoftFamily'; + 'Microsoft.WindowsFeedbackHub'; + 'Microsoft.Edge.GameAssist'; + 'Microsoft.Getstarted'; + 'Microsoft.WindowsMaps'; + 'Microsoft.MixedReality.Portal'; + 'Microsoft.BingNews'; + 'Microsoft.MicrosoftOfficeHub'; + 'Microsoft.Paint'; + 'Microsoft.Windows.Photos'; + 'Microsoft.PowerAutomateDesktop'; + 'MicrosoftCorporationII.QuickAssist'; + 'Microsoft.SkypeApp'; + 'Microsoft.MicrosoftSolitaireCollection'; + 'Microsoft.MicrosoftStickyNotes'; + 'Microsoft.Todos'; + 'Microsoft.Wallet'; + 'Microsoft.YourPhone'; +); +$getCommand = { + Get-AppxProvisionedPackage -Online; +}; +$filterCommand = { + $_.DisplayName -eq $selector; +}; +$removeCommand = { + [CmdletBinding()] + param( + [Parameter( Mandatory, ValueFromPipeline )] + $InputObject + ); + process { + $InputObject | Remove-AppxProvisionedPackage -AllUsers -Online -ErrorAction 'Continue'; + } +}; +$type = 'Package'; +$logfile = 'C:\Windows\Setup\Scripts\RemovePackages.log'; +&amp; { + $installed = &amp; $getCommand; + foreach( $selector in $selectors ) { + $result = [ordered] @{ + Selector = $selector; + }; + $found = $installed | Where-Object -FilterScript $filterCommand; + if( $found ) { + $result.Output = $found | &amp; $removeCommand; + if( $? ) { + $result.Message = "$type removed."; + } else { + $result.Message = "$type not removed."; + $result.Error = $Error[0]; + } + } else { + $result.Message = "$type not installed."; + } + $result | ConvertTo-Json -Depth 3 -Compress; + } +} *&gt;&amp;1 &gt;&gt; $logfile; + </File> + <File path="C:\Windows\Setup\Scripts\RemoveCapabilities.ps1"> +$selectors = @( + 'Print.Fax.Scan'; + 'Language.Handwriting'; + 'Browser.InternetExplorer'; + 'MathRecognizer'; + 'OneCoreUAP.OneSync'; + 'Microsoft.Windows.MSPaint'; + 'Microsoft.Windows.PowerShell.ISE'; + 'App.Support.QuickAssist'; + 'Language.Speech'; + 'Language.TextToSpeech'; + 'App.StepsRecorder'; + 'Hello.Face.18967'; + 'Hello.Face.Migration.18967'; + 'Hello.Face.20134'; + 'Microsoft.Windows.WordPad'; +); +$getCommand = { + Get-WindowsCapability -Online | Where-Object -Property 'State' -NotIn -Value @( + 'NotPresent'; + 'Removed'; + ); +}; +$filterCommand = { + ($_.Name -split '~')[0] -eq $selector; +}; +$removeCommand = { + [CmdletBinding()] + param( + [Parameter( Mandatory, ValueFromPipeline )] + $InputObject + ); + process { + $InputObject | Remove-WindowsCapability -Online -ErrorAction 'Continue'; + } +}; +$type = 'Capability'; +$logfile = 'C:\Windows\Setup\Scripts\RemoveCapabilities.log'; +&amp; { + $installed = &amp; $getCommand; + foreach( $selector in $selectors ) { + $result = [ordered] @{ + Selector = $selector; + }; + $found = $installed | Where-Object -FilterScript $filterCommand; + if( $found ) { + $result.Output = $found | &amp; $removeCommand; + if( $? ) { + $result.Message = "$type removed."; + } else { + $result.Message = "$type not removed."; + $result.Error = $Error[0]; + } + } else { + $result.Message = "$type not installed."; + } + $result | ConvertTo-Json -Depth 3 -Compress; + } +} *&gt;&amp;1 &gt;&gt; $logfile; + </File> + <File path="C:\Windows\Setup\Scripts\RemoveFeatures.ps1"> +$selectors = @( + 'Microsoft-RemoteDesktopConnection'; + 'Recall'; +); +$getCommand = { + Get-WindowsOptionalFeature -Online | Where-Object -Property 'State' -NotIn -Value @( + 'Disabled'; + 'DisabledWithPayloadRemoved'; + ); +}; +$filterCommand = { + $_.FeatureName -eq $selector; +}; +$removeCommand = { + [CmdletBinding()] + param( + [Parameter( Mandatory, ValueFromPipeline )] + $InputObject + ); + process { + $InputObject | Disable-WindowsOptionalFeature -Online -Remove -NoRestart -ErrorAction 'Continue'; + } +}; +$type = 'Feature'; +$logfile = 'C:\Windows\Setup\Scripts\RemoveFeatures.log'; +&amp; { + $installed = &amp; $getCommand; + foreach( $selector in $selectors ) { + $result = [ordered] @{ + Selector = $selector; + }; + $found = $installed | Where-Object -FilterScript $filterCommand; + if( $found ) { + $result.Output = $found | &amp; $removeCommand; + if( $? ) { + $result.Message = "$type removed."; + } else { + $result.Message = "$type not removed."; + $result.Error = $Error[0]; + } + } else { + $result.Message = "$type not installed."; + } + $result | ConvertTo-Json -Depth 3 -Compress; + } +} *&gt;&amp;1 &gt;&gt; $logfile; + </File> <File path="C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1"> &amp; { foreach( $letter in 'DEFGHIJKLMNOPQRSTUVWXYZ'.ToCharArray() ) { @@ -192,20 +368,16 @@ $shellParams = @{ } New-ItemProperty @shellParams -# Set time to UTC +# Set real-time clock to UTC $shellParams = @{ - Path = 'HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation' - Name = 'RealTimeIsUniversal' - Value = '00000001' - PropertyType = 'dword' - Force = $true + Path = 'HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation' + Name = 'RealTimeIsUniversal' + Value = '1' + PropertyType = 'DWord' } New-ItemProperty @shellParams -Set-Service -Name sshd -StartupType Automatic -Status Running - </File> - <File path="C:\Windows\Setup\Scripts\unattend-02.ps1"> Set-Service -Name sshd -StartupType Automatic -Status Running </File> <File path="C:\Windows\Setup\Scripts\Specialize.ps1"> @@ -213,6 +385,18 @@ $scripts = @( { reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f; }; + { + Remove-Item -LiteralPath 'Registry::HKLM\Software\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\DevHomeUpdate' -Force -ErrorAction 'SilentlyContinue'; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemovePackages.ps1' -Raw | Invoke-Expression; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveCapabilities.ps1' -Raw | Invoke-Expression; + }; + { + Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\RemoveFeatures.ps1' -Raw | Invoke-Expression; + }; { net.exe accounts /maxpwage:UNLIMITED; }; @@ -220,9 +404,15 @@ $scripts = @( netsh.exe advfirewall firewall set rule group="@FirewallAPI.dll,-28752" new enable=Yes; reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f; }; + { + icacls.exe C:\ /remove:g "*S-1-5-11" + }; { reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f; }; + { + reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f; + }; { reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\BitLocker" /v "PreventDeviceEncryption" /t REG_DWORD /d 1 /f; }; @@ -258,6 +448,9 @@ $scripts = @( { Set-WinHomeLocation -GeoId 212; }; + { + Get-AppxPackage -Name 'Microsoft.Windows.Ai.Copilot.Provider' | Remove-AppxPackage; + }; { Set-ItemProperty -LiteralPath 'Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'LaunchTo' -Type 'DWord' -Value 1; }; @@ -287,6 +480,9 @@ $scripts = @( </File> <File path="C:\Windows\Setup\Scripts\DefaultUser.ps1"> $scripts = @( + { + reg.exe add "HKU\DefaultUser\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f; + }; { reg.exe add "HKU\DefaultUser\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f; }; @@ -325,9 +521,6 @@ $scripts = @( { Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\VirtIoGuestTools.ps1' -Raw | Invoke-Expression; }; - { - Get-Content -LiteralPath 'C:\Windows\Setup\Scripts\unattend-02.ps1' -Raw | Invoke-Expression; - }; ); &amp; { From 4d3b5f20a7f8c27d412133c8e4a961596f62d8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 11:25:00 +0200 Subject: [PATCH 22/66] Fix README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9902f4b..d9a940c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ Ansible playbooks for deploying classroom computers. Run with something like: ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py or, for Apple computers: - ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py + + ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py # How classroom computers are prepared at FRI From 7559b049a25f09d42c0fad13bc5452d8ad70ce84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 11:28:05 +0200 Subject: [PATCH 23/66] Fix README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9a940c..1347d3c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ or, for Apple computers: The computers are prepared as follows: - Ask teachers to check their requirements. - Fix ansible scripts according to the requirements. - - Set up a fresh Windows and Linux install on a VM. + - Set up a fresh Windows and Linux install on a VM, using files in unattended\_install. - Use ansible to deploy the software, fixing fresh bugs due to changes in the install processes along the way. - Fix root filesystem UUIDs to what they were last year so the network-booted menu still works. - Create partition table image and partition images using [FRI Backup](https://github.com/UL-FRI/ansible_classroom_deploy/tree/main/fri_backup). From 07f4a73daee99151be0e97f3a1a63178f1caf34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 11:37:40 +0200 Subject: [PATCH 24/66] Fix name for adding Java bin dir to PATH --- roles/jdk/tasks/main_win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/jdk/tasks/main_win.yml b/roles/jdk/tasks/main_win.yml index 27cf8c2..be8ea09 100644 --- a/roles/jdk/tasks/main_win.yml +++ b/roles/jdk/tasks/main_win.yml @@ -28,7 +28,7 @@ state: present scope: machine -- name: Java bin dir "." to PATH +- name: Add Java bin dir to PATH win_path: name: PATH elements: "{{ reg['raw_value'] }}\\bin" From d985d8ff844f215ac42859b35b0b2bd64bbc2085 Mon Sep 17 00:00:00 2001 From: RR <rob.r374@gmail.com> Date: Thu, 4 Sep 2025 17:57:15 +0200 Subject: [PATCH 25/66] 2025 corrections for ucilnicesmb storage.... --- roles/stm32cube/tasks/main_lin.yml | 3 ++- roles/stm32cube/tasks/main_win.yml | 9 ++++++--- roles/stm32duino/tasks/main_win.yml | 5 +++-- roles/stm32mems-studio/tasks/main_win.yml | 3 ++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/roles/stm32cube/tasks/main_lin.yml b/roles/stm32cube/tasks/main_lin.yml index 085ffca..2c2f7ab 100644 --- a/roles/stm32cube/tasks/main_lin.yml +++ b/roles/stm32cube/tasks/main_lin.yml @@ -12,7 +12,8 @@ - name: Download stm32 command: - cmd: wget 'https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERLZDFSgbO1Hm6TT9CLhyUIBZS-4anic7RWtvQliqN-thA?e=KZq4VJ' -O {{ dest_fname }} + # cmd: wget 'https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERLZDFSgbO1Hm6TT9CLhyUIBZS-4anic7RWtvQliqN-thA?e=KZq4VJ' -O {{ dest_fname }} + cmd: wget {{ installers }}\RAVINOR\2025\st-stm32cubeide_1.19.0_25607_20250703_0907_amd64.sh -O {{ dest_fname }} creates: "{{ dest_fname }} " # url: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/ERLZDFSgbO1Hm6TT9CLhyUIBZS-4anic7RWtvQliqN-thA?e=KZq4VJ diff --git a/roles/stm32cube/tasks/main_win.yml b/roles/stm32cube/tasks/main_win.yml index de16294..c01c4bc 100644 --- a/roles/stm32cube/tasks/main_win.yml +++ b/roles/stm32cube/tasks/main_win.yml @@ -26,7 +26,8 @@ # arguments: /S - name: Download CubeProgrammer - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXHsKDjM6hVAuEGwEWcMyBEBgx7D9i_M3QAkhpe9RR9zPQ?e=VcUvvu" -O "{{ cubeprogrammer_download_file }}" + win_command: wget "{{ installers }}\RAVINOR\2025\SetupSTM32CubeProgrammer_win64.exe" -O "{{ cubeprogrammer_download_file }}" + #win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXHsKDjM6hVAuEGwEWcMyBEBgx7D9i_M3QAkhpe9RR9zPQ?e=VcUvvu" -O "{{ cubeprogrammer_download_file }}" #win_get_url: # dest: C:\CubeProgrammer.exe #register: cubeprogrammer_download @@ -42,7 +43,8 @@ # TODO 2025: only zip distributions exists in zip file # TODO 2025: URL: https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EcU8MQwONYZKuk22puks-IgBd1qLM94DH3AA_CEclIgTZg?e=jRcA3v # TODO 2025: Have extracted setup exe - not sure if this is enough! - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EbVvZi3q7QRNqwocCSgMvGgB-eYM2mtb-IidD1UTaMgtbw?e=QDxd29" -O "{{ cubemonitor_download_file }}" + # win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EbVvZi3q7QRNqwocCSgMvGgB-eYM2mtb-IidD1UTaMgtbw?e=QDxd29" -O "{{ cubemonitor_download_file }}" + win_command: wget "{{ installers }}\RAVINOR\2025\setupSTM32CubeMonitor_1.10.0.exe" -O "{{ cubemonitor_download_file }}" #win_get_url: # dest: C:\CubeMonitor.exe #register: cubemonitor_download @@ -69,7 +71,8 @@ # arguments: /S - name: Download CubeIDE # win_get_url: - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZLOLK_5IxpPvnI_rYH6hSMBuQyH3EEq9bqZr9X_n6cgzA?e=P218RC" -O "{{ cubeide_download_file }}" + #win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EZLOLK_5IxpPvnI_rYH6hSMBuQyH3EEq9bqZr9X_n6cgzA?e=P218RC" -O "{{ cubeide_download_file }}" + win_command: wget "{{ installers }}\RAVINOR\2025\st-stm32cubeide_1.19.0_25607_20250703_0907_x86_64.exe" -O "{{ cubeide_download_file }}" #dest: C:\st-stm32cubeide_1.19.0_25607_20250703_0907_x86_64.exe #register: cubeide_download args: diff --git a/roles/stm32duino/tasks/main_win.yml b/roles/stm32duino/tasks/main_win.yml index cc9fe81..c2b2a1a 100644 --- a/roles/stm32duino/tasks/main_win.yml +++ b/roles/stm32duino/tasks/main_win.yml @@ -14,8 +14,9 @@ state: directory - name: Install preinstalled STM32Duino & Arduino environment - win_get_url: - url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ" + win_unzip: + # url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ" + src: {{ installers }}\RAVINOR\2025\arduino-1.8.19.zip dest: "{{large_prog_dir}}\\RAVINOR\\STM32Duino" # TODO Don't know if unzipping is required? diff --git a/roles/stm32mems-studio/tasks/main_win.yml b/roles/stm32mems-studio/tasks/main_win.yml index 8a1ea31..4f6da1b 100644 --- a/roles/stm32mems-studio/tasks/main_win.yml +++ b/roles/stm32mems-studio/tasks/main_win.yml @@ -6,7 +6,8 @@ - when: not file.stat.exists block: - name: Download MEMS-Studio - win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXgZSDD5LgtMrikaKszPliwB1vXrwUxea3eYYObT3zXBaQ?e=eNJyLA" -O C:\mems-studio-2.1.2.exe + #win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXgZSDD5LgtMrikaKszPliwB1vXrwUxea3eYYObT3zXBaQ?e=eNJyLA" -O C:\mems-studio-2.1.2.exe + win_command: wget "{{ installers }}\RAVINOR\2025\mems-studio-2.1.2.exe" -O C:\mems-studio-2.1.2.exe args: creates: C:\mems-studio-2.1.2.exe #win_get_url: From 529623497c3964e174ef5c2c9fdfe9cbb52ebb2c Mon Sep 17 00:00:00 2001 From: "r.rozmann@jung-electronic.de" <r.rozmann@jung-electronic.de> Date: Thu, 14 Aug 2025 16:37:18 +0200 Subject: [PATCH 26/66] stm32mems-studio added (replaces unicleogui and algobuilder) added to VIN recipe --- roles/stm32mems-studio/tasks/main_win.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/stm32mems-studio/tasks/main_win.yml b/roles/stm32mems-studio/tasks/main_win.yml index 4f6da1b..7e51423 100644 --- a/roles/stm32mems-studio/tasks/main_win.yml +++ b/roles/stm32mems-studio/tasks/main_win.yml @@ -7,9 +7,9 @@ block: - name: Download MEMS-Studio #win_command: wget "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EXgZSDD5LgtMrikaKszPliwB1vXrwUxea3eYYObT3zXBaQ?e=eNJyLA" -O C:\mems-studio-2.1.2.exe - win_command: wget "{{ installers }}\RAVINOR\2025\mems-studio-2.1.2.exe" -O C:\mems-studio-2.1.2.exe + win_command: copy "{{ installers }}\RAVINOR\2025\mems-studio-2.1.2.exe" -O { large_prog_dir }\mems-studio-2.1.2.exe args: - creates: C:\mems-studio-2.1.2.exe + creates: {large_prog_dir}\mems-studio-2.1.2.exe #win_get_url: # follow_redirects: all # http_agent: Wget/1.21.3 @@ -19,13 +19,13 @@ - name: Install MEMS-Studio win_package: - path: C:\mems-studio-2.1.2.exe + path: {large_prog_dir}\mems-studio-2.1.2.exe # path: "{{ download.dest }}" arguments: /Verysilent /AllUsers - name: Remove temporary files win_file: - path: C:\mems-studio-2.1.2.exe + path: {large_prog_dir}\mems-studio-2.1.2.exe # path: "{{ download.dest }}" state: absent From 9e9d487d573c7f1a2f9bcbdd0937c406177cb16b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Mon, 18 Aug 2025 15:49:43 +0200 Subject: [PATCH 27/66] Disable CUFinder --- setup.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/setup.yml b/setup.yml index 5596e87..d75b3e8 100644 --- a/setup.yml +++ b/setup.yml @@ -15,14 +15,7 @@ - vars/software_keys.yml - vars/dirs.yml roles: - # - all_classes - # - fri_base - - android_studio - # - jdk - # - powerdesigner - # - solidworks - # - # - omnetpp + - all_classes # - stm32cube # - processing # - powerdesigner From 99a8aa06db697fadc5ea86d5b92edb7e517f9a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 2 Sep 2025 11:22:49 +0200 Subject: [PATCH 28/66] Fix / extend README --- README.md | 2 -- roles/stm32duino/tasks/main_win.yml | 3 --- setup.yml | 3 ++- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1347d3c..74c99c4 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ # Using the ansible scripts Ansible playbooks for deploying classroom computers. Run with something like: - ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py or, for Apple computers: - ansible-playbook --user <local admin> -k -K -i inventory.yml macsetup.py # How classroom computers are prepared at FRI diff --git a/roles/stm32duino/tasks/main_win.yml b/roles/stm32duino/tasks/main_win.yml index c2b2a1a..7022561 100644 --- a/roles/stm32duino/tasks/main_win.yml +++ b/roles/stm32duino/tasks/main_win.yml @@ -15,10 +15,7 @@ - name: Install preinstalled STM32Duino & Arduino environment win_unzip: - # url: "https://unilj-my.sharepoint.com/:u:/g/personal/rozman_fri1_uni-lj_si/EYTFhlsJOFtFk9xsaViP0eYBtILVS24ZF_dlkgodu_L9Nw?e=geavvJ" src: {{ installers }}\RAVINOR\2025\arduino-1.8.19.zip dest: "{{large_prog_dir}}\\RAVINOR\\STM32Duino" - # TODO Don't know if unzipping is required? - # TODO check if anything else is needed (esp8266com)? diff --git a/setup.yml b/setup.yml index d75b3e8..6f3b5f7 100644 --- a/setup.yml +++ b/setup.yml @@ -15,7 +15,8 @@ - vars/software_keys.yml - vars/dirs.yml roles: - - all_classes + - all_classes + # - omnetpp # - stm32cube # - processing # - powerdesigner From fc01fec18c5917a9b5d08d6b14e5b058297e4131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 5 Sep 2025 00:11:16 +0200 Subject: [PATCH 29/66] Fix iverilog role; stil doesn't work --- roles/iverilog/tasks/main_win.yml | 1 - setup.yml | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/roles/iverilog/tasks/main_win.yml b/roles/iverilog/tasks/main_win.yml index e190dea..d8d6d03 100644 --- a/roles/iverilog/tasks/main_win.yml +++ b/roles/iverilog/tasks/main_win.yml @@ -2,5 +2,4 @@ win_chocolatey: name: iverilog version: '11.0' - source: http://internal/odata/repo state: present diff --git a/setup.yml b/setup.yml index 6f3b5f7..6d854ff 100644 --- a/setup.yml +++ b/setup.yml @@ -16,11 +16,8 @@ - vars/dirs.yml roles: - all_classes - # - omnetpp - # - stm32cube - # - processing - # - powerdesigner - # - nodejs - # - qcadesigner-e + # - all_classes # - fri_base + # - android_studio + # - jdk # - powerdesigner From bdc4fa2fc5ae16016a6965babcdd514793f08bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sat, 6 Sep 2025 01:02:27 +0200 Subject: [PATCH 30/66] Add ssh keys --- roles/fri_base/files/authorized_keys | 4 ++++ roles/fri_base/tasks/main_lin.yml | 5 +++++ roles/fri_base/tasks/main_win.yml | 10 ++++++++++ 3 files changed, 19 insertions(+) create mode 100644 roles/fri_base/files/authorized_keys diff --git a/roles/fri_base/files/authorized_keys b/roles/fri_base/files/authorized_keys new file mode 100644 index 0000000..bffc05c --- /dev/null +++ b/roles/fri_base/files/authorized_keys @@ -0,0 +1,4 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM2Tn8+rH+fkFkBycxYrJ7TzhXQhuf3U+w23JFlZoRiX polz@povzpetnik" +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRpoWIH5u2g12IM39WNRzLsPksfSjfL/82fPnuZwZ7H polz@it-polz" +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCq7NrrDD53pe9Zpn/dRSPxWQLDIZ9INS0kz/ps/9fGsM8/H/J7jr/ecj0j0jfYig6QdV8G7VnpLWjcuJ65ul3u2rnQSN78Ms/hxlAhmyahQtBA2q2D2zqI2PDWsKAySWmfFg+2W5fYmE1+F9GEB0OWNOuClmfo2A1c8Ve76qSiehHgjYo0G1CQrXkmE00GBLqyqkbyyStLa9DUfaDwrbOu4tJChHo4jDGuLH5QCYcN+RRXjwPQKgk0L2yfu1479L0XqhbEo+KHoIZH501fkoE+gUKVyLERvkhKSiCgPhJmAgRN1bRsiyTwvQzoED4q1RwFmG0AKg0U5bHnAAOd77uyuIYmcFiaRGHROQ9ZbyB9tJ07QrFlzRkderDd5Z18mO7LtgDjFZ2B2DlRY6zxMiUqJyDRnHjDF3+3DTlHIUCC3aEtoYS8MPyRL1b8XenIqswXkM+vkYFeKh2ynjNu3C6VqDCXZFvIi6f1X0ojZXRrDmbiON8Y74HjxP0z6TB1U30= polz@ucilnicenfs-2020 + diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 9ada163..e60504a 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -157,3 +157,8 @@ - /etc/skel/.bashrc - /etc/profile - /etc/bash.bashrc + +- name: Copy authorized_keys + copy: + src: authorized_keys + dest: ~/.ssh/authorized_keys diff --git a/roles/fri_base/tasks/main_win.yml b/roles/fri_base/tasks/main_win.yml index 0a68dbd..9e3b5e5 100644 --- a/roles/fri_base/tasks/main_win.yml +++ b/roles/fri_base/tasks/main_win.yml @@ -36,5 +36,15 @@ allow_clobber: true state: present +- name: Copy admin ssh keys to authorized_keys + win_copy: + src: authorized_keys + dest: "%USERPROFILE%\\.ssh" + +- name: Copy admin keys to administrators_authorized_keys + win_copy: + src: authorized_keys + dest: C:\ProgramData\ssh\administrators_authorized_keys + # TODO: turn on GPO to allow guest SMB logins # TODO: open firewall for Samba From 15eb772ba0a2ffbb32fc52ee6fddc6471a898d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sun, 7 Sep 2025 19:38:23 +0200 Subject: [PATCH 31/66] Fix mount for C and D --- roles/fri_base/tasks/main_lin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index e60504a..8688341 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -103,7 +103,7 @@ mount: boot: true fstype: ntfs-3g - src: UUID=A09E30889E30594C + src: "PARTLABEL=Basic\\040data\\040partition" path: /mnt/C state: mounted opts: defaults,nofail @@ -112,7 +112,7 @@ mount: boot: true fstype: ntfs-3g - src: "LABEL=D:" + src: "PARTLABEL=D:" path: /mnt/D state: mounted opts: defaults,nofail From 9d90dbffbea2619ff486e06569b43a20bafd74ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 9 Sep 2025 10:00:29 +0200 Subject: [PATCH 32/66] Allow students to log in without typing the whole domain --- roles/ad_joined/templates/sssd.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/ad_joined/templates/sssd.conf b/roles/ad_joined/templates/sssd.conf index 46c5c5b..248f402 100644 --- a/roles/ad_joined/templates/sssd.conf +++ b/roles/ad_joined/templates/sssd.conf @@ -3,6 +3,7 @@ config_file_version = 2 domains = fri1.uni-lj.si enable_files_domain = False services = nss, pam +default_domain_suffix = student.uni-lj.si [nss] filtered_groups = root From 8b2bbbd2402e1a244b4155d4d4c74c728c09e82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 9 Sep 2025 10:19:51 +0200 Subject: [PATCH 33/66] Fix lightdm user display --- roles/fri_base/tasks/main_lin.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 8688341..9b0f511 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -158,6 +158,12 @@ - /etc/profile - /etc/bash.bashrc +- name: Hide users in lightdm + lineinfile: + path: /etc/lightdm/lightdm.conf + regexp: "#?greeter-hide-users=" + line: greeter-hide-users=true + - name: Copy authorized_keys copy: src: authorized_keys From a0713cd89a0a126183e77eaef0d66f9cf8408ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Wed, 10 Sep 2025 13:34:04 +0200 Subject: [PATCH 34/66] Fix XAMPP after testing --- roles/xampp/tasks/main_win.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/xampp/tasks/main_win.yml b/roles/xampp/tasks/main_win.yml index 154de4a..43c35ac 100644 --- a/roles/xampp/tasks/main_win.yml +++ b/roles/xampp/tasks/main_win.yml @@ -3,12 +3,12 @@ name: xampp-81 install_args: "" -- name: Make XAMPP config world writable +- name: Make XAMPP world writable win_acl: user: 'Authenticated Users' - path: "C:\\xampp\\xampp-control.ini" + path: "C:\\xampp\\" type: allow - rights: Write + rights: FullControl - name: Add firewall rules for XAMPP win_firewall_rule: From d03aa86378f981cb4e6ffa5fabe9371c8d952994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Wed, 10 Sep 2025 14:21:31 +0200 Subject: [PATCH 35/66] Add python3-cryptography --- roles/VP-63775/meta/main.yml | 1 + roles/cryptography/tasks/main.yml | 4 ++++ roles/cryptography/tasks/main_lin.yml | 5 +++++ roles/cryptography/tasks/main_win.yml | 2 ++ 4 files changed, 12 insertions(+) create mode 100644 roles/cryptography/tasks/main.yml create mode 100644 roles/cryptography/tasks/main_lin.yml create mode 100644 roles/cryptography/tasks/main_win.yml diff --git a/roles/VP-63775/meta/main.yml b/roles/VP-63775/meta/main.yml index 9185ffc..ea90757 100644 --- a/roles/VP-63775/meta/main.yml +++ b/roles/VP-63775/meta/main.yml @@ -14,4 +14,5 @@ dependencies: - role: jdk - role: jupyter - role: pycharm + - role: cryptography - role: flask diff --git a/roles/cryptography/tasks/main.yml b/roles/cryptography/tasks/main.yml new file mode 100644 index 0000000..66e93fe --- /dev/null +++ b/roles/cryptography/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' \ No newline at end of file diff --git a/roles/cryptography/tasks/main_lin.yml b/roles/cryptography/tasks/main_lin.yml new file mode 100644 index 0000000..eb361bb --- /dev/null +++ b/roles/cryptography/tasks/main_lin.yml @@ -0,0 +1,5 @@ +- name: Install python-cryptography + apt: + name: + - python3-cryptography + state: latest diff --git a/roles/cryptography/tasks/main_win.yml b/roles/cryptography/tasks/main_win.yml new file mode 100644 index 0000000..b5759ef --- /dev/null +++ b/roles/cryptography/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install python3-cryptography + win_command: pip install cryptography From 5db95e87090605303fac2b290c2d3177366e049b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 11 Sep 2025 13:15:49 +0200 Subject: [PATCH 36/66] Enable common homes between Windows and Ubuntu --- roles/ad_joined/files/pam_mount.conf.xml | 10 +++++----- roles/ad_joined/templates/sssd.conf | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/roles/ad_joined/files/pam_mount.conf.xml b/roles/ad_joined/files/pam_mount.conf.xml index 24167bc..a6d8570 100644 --- a/roles/ad_joined/files/pam_mount.conf.xml +++ b/roles/ad_joined/files/pam_mount.conf.xml @@ -7,7 +7,7 @@ <volume fstype="cifs" server="ucilnicesmb.fri1.uni-lj.si" - path="%(USER)" + path="profiles/%(DOMAIN_USER).%(DOMAIN_NAME)" mountpoint="~/" options="sec=krb5i,cruid=%(USERUID)" > @@ -15,11 +15,11 @@ <or> <user>local_admin</user> <user>root</user> - <sgrp>sudo</sgrp> + <sgrp>users</sgrp> </or> </not> </volume> - <volume + <!-- <volume fstype="cifs" server="ucilnicesmb.fri1.uni-lj.si" path="profiles/%(DOMAIN_USER).V6" @@ -30,8 +30,8 @@ <or> <user>local_admin</user> <user>root</user> - <sgrp>sudo</sgrp> + <sgrp>users</sgrp> </or> </not> - </volume> + </volume> --> </pam_mount> diff --git a/roles/ad_joined/templates/sssd.conf b/roles/ad_joined/templates/sssd.conf index 248f402..e69948b 100644 --- a/roles/ad_joined/templates/sssd.conf +++ b/roles/ad_joined/templates/sssd.conf @@ -28,6 +28,7 @@ krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True use_fully_qualified_names = True +full_name_format = %1$s@%3$s fallback_homedir = /home/%u@%d access_provider = ad krb5_ccname_template = FILE:%d/krb5cc_%U From 76dff08c6503e7bc807a1aa23accea1d95503006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 11 Sep 2025 13:17:30 +0200 Subject: [PATCH 37/66] Change generic Windows key --- unattended_install/win/autounattend.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_install/win/autounattend.xml b/unattended_install/win/autounattend.xml index 6ee0db5..8893885 100644 --- a/unattended_install/win/autounattend.xml +++ b/unattended_install/win/autounattend.xml @@ -23,7 +23,7 @@ </ImageInstall> <UserData> <ProductKey> - <Key>YNMGQ-8RYV3-4PGQ3-C8XTP-7CFBY</Key> + <Key>NW6C2-QMPVW-D7KKK-3GKT6-VCFB2</Key> <WillShowUI>OnError</WillShowUI> </ProductKey> <AcceptEula>true</AcceptEula> @@ -546,4 +546,4 @@ $scripts = @( } *&gt;&amp;1 &gt;&gt; "C:\Windows\Setup\Scripts\FirstLogon.log"; </File> </Extensions> -</unattend> \ No newline at end of file +</unattend> From 14a0096779232e24584ff50603172984067432f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 11 Sep 2025 13:18:33 +0200 Subject: [PATCH 38/66] Fix Android Studio after testing --- roles/android_studio/tasks/main_win.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/android_studio/tasks/main_win.yml b/roles/android_studio/tasks/main_win.yml index e4de8ee..60ab850 100644 --- a/roles/android_studio/tasks/main_win.yml +++ b/roles/android_studio/tasks/main_win.yml @@ -1,6 +1,7 @@ - name: Set Android Studio version set_fact: studio_path: "{{ large_prog_dir }}\\android-studio" + sdk_path: "{{ large_prog_dir }}\\android-sdk" studio_version: "2025.1.2.13" tools_version: "13114758_latest" @@ -54,12 +55,23 @@ path: "{{ large_prog_dir }}\\.android" state: directory +- name: Create Android Studio SDK directory + win_file: + path: "{{ sdk_path }}" + state: directory + + +- name: Create Android Studio shortcut + win_shortcut: + dest: "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Android Studio\\Android Studio.lnk" + src: "{{ studio_path }}\\bin\\studio64.exe" + - name: Set Android Studio environment variables win_environment: level: machine variables: ANDROID_HOME: "{{ studio_path }}" - ANDROID_SDK_ROOT: "{{ studio_path }}" + ANDROID_SDK_ROOT: "{{ sdk_path }}" ANDROID_PREFS_ROOT: "{{ large_prog_dir }}\\" GRADLE_USER_HOME: "{{ large_prog_dir }}\\.gradle" From 674ea7977c4997cb657a719e4ae04748b64c74ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 11 Sep 2025 13:19:26 +0200 Subject: [PATCH 39/66] Add various *top programs --- roles/fri_base/tasks/main_lin.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 9b0f511..203ab5c 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -28,6 +28,9 @@ - wine-binfmt - dosbox - snapper + - htop + - btop + - iotop # - webext-ublock-origin-chromium # - webext-ublock-origin-firefox - nethack-console From ab1e0da566a48779d9a7445a7384d727caaa5136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 11 Sep 2025 13:20:49 +0200 Subject: [PATCH 40/66] Add join_ad playbook, define large_prog_dir --- join_ad.yml | 19 +++++++++++++++++++ vars/dirs.yml | 1 + 2 files changed, 20 insertions(+) create mode 100644 join_ad.yml create mode 100644 vars/dirs.yml diff --git a/join_ad.yml b/join_ad.yml new file mode 100644 index 0000000..68ba724 --- /dev/null +++ b/join_ad.yml @@ -0,0 +1,19 @@ +- name: Gather facts / setup connection + hosts: '*' + gather_facts: false + become: false + vars_files: + - vars/credentials.yml + roles: + - facts + +- name: Join AD + hosts: '*' + become: true + debugger: on_failed + vars_files: + - vars/credentials.yml + vars: + domain_name: "FRI1.UNI-LJ.SI" + roles: + - ad_joined diff --git a/vars/dirs.yml b/vars/dirs.yml new file mode 100644 index 0000000..8c80daa --- /dev/null +++ b/vars/dirs.yml @@ -0,0 +1 @@ +large_prog_dir: "E:" From e0de1f5493b4dafacd46dcf3b7f10bd1366e1a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 13:55:22 +0200 Subject: [PATCH 41/66] Add vscode plugins for PPJ, FP --- roles/vscode/tasks/vscode_extensions.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/vscode/tasks/vscode_extensions.yml b/roles/vscode/tasks/vscode_extensions.yml index 5c47d87..2aff754 100644 --- a/roles/vscode/tasks/vscode_extensions.yml +++ b/roles/vscode/tasks/vscode_extensions.yml @@ -13,6 +13,8 @@ VSCode_Extensions: - stonebuddha.vscode-better-sml - vscode-icons-team.vscode-icons - vscjava.vscode-java-pack + - shd101wyy.markdown-preview-enhanced + # - oracle.oracle-java - dan-c-underwood.arm # RA-63703 - marus25.cortex-debug # RA-63703 - NateAGeek.memory-viewer # RA-63703 @@ -20,4 +22,6 @@ VSCode_Extensions: - platformio.platformio-ide # ORS-63218 - stmicroelectronics.stm32-vscode-extension # RA-63703 - danielpinto8zz6.c-cpp-compile-run + - danielraggi.sml-environment-2024 + - ocamllabs.ocaml-platform # - vadimcn.vscode-lldb From e4ba740edf717cac2ab899cb572d865658d22685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:15:05 +0200 Subject: [PATCH 42/66] Add ml wrapper to SML --- roles/smlnj/tasks/main_lin.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/smlnj/tasks/main_lin.yml b/roles/smlnj/tasks/main_lin.yml index 7096389..eb46412 100644 --- a/roles/smlnj/tasks/main_lin.yml +++ b/roles/smlnj/tasks/main_lin.yml @@ -10,4 +10,8 @@ apt: name: elpa-sml-mode state: latest - +- name: Create ml wrapper + copy: + src: ml + dest: /usr/local/bin/ml + mode: 775 From 99c9ae8848690e79d300c98402f4bde6d5b6b898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:30:07 +0200 Subject: [PATCH 43/66] Update dependencies for KRV --- roles/KRV-63528/meta/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/KRV-63528/meta/main.yml b/roles/KRV-63528/meta/main.yml index 300873b..d290c27 100644 --- a/roles/KRV-63528/meta/main.yml +++ b/roles/KRV-63528/meta/main.yml @@ -7,3 +7,6 @@ dependencies: - role: jupyter - role: openssl + - role: cryptodome + - role: pwntools + - role: python From 84c21cd8631307a1497517a013ace79787c690d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:30:50 +0200 Subject: [PATCH 44/66] Add dependencies for KRV --- roles/cryptodome/tasks/main.yml | 4 ++++ roles/cryptodome/tasks/main_lin.yml | 5 +++++ roles/cryptodome/tasks/main_win.yml | 2 ++ roles/pwntools/tasks/main.yml | 4 ++++ roles/pwntools/tasks/main_lin.yml | 5 +++++ roles/pwntools/tasks/main_win.yml | 2 ++ roles/python3/tasks/main_lin.yml | 4 ++++ 7 files changed, 26 insertions(+) create mode 100644 roles/cryptodome/tasks/main.yml create mode 100644 roles/cryptodome/tasks/main_lin.yml create mode 100644 roles/cryptodome/tasks/main_win.yml create mode 100644 roles/pwntools/tasks/main.yml create mode 100644 roles/pwntools/tasks/main_lin.yml create mode 100644 roles/pwntools/tasks/main_win.yml diff --git a/roles/cryptodome/tasks/main.yml b/roles/cryptodome/tasks/main.yml new file mode 100644 index 0000000..66e93fe --- /dev/null +++ b/roles/cryptodome/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' \ No newline at end of file diff --git a/roles/cryptodome/tasks/main_lin.yml b/roles/cryptodome/tasks/main_lin.yml new file mode 100644 index 0000000..33ba5db --- /dev/null +++ b/roles/cryptodome/tasks/main_lin.yml @@ -0,0 +1,5 @@ +- name: Install python-cryptodome + apt: + name: + - python3-cryptodome + state: latest diff --git a/roles/cryptodome/tasks/main_win.yml b/roles/cryptodome/tasks/main_win.yml new file mode 100644 index 0000000..3cce942 --- /dev/null +++ b/roles/cryptodome/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install python3-cryptodome + win_command: pip install cryptodome diff --git a/roles/pwntools/tasks/main.yml b/roles/pwntools/tasks/main.yml new file mode 100644 index 0000000..66e93fe --- /dev/null +++ b/roles/pwntools/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' \ No newline at end of file diff --git a/roles/pwntools/tasks/main_lin.yml b/roles/pwntools/tasks/main_lin.yml new file mode 100644 index 0000000..009cd6f --- /dev/null +++ b/roles/pwntools/tasks/main_lin.yml @@ -0,0 +1,5 @@ +- name: Install python-pwntools + apt: + name: + - python3-pwntools + state: latest diff --git a/roles/pwntools/tasks/main_win.yml b/roles/pwntools/tasks/main_win.yml new file mode 100644 index 0000000..6b254c8 --- /dev/null +++ b/roles/pwntools/tasks/main_win.yml @@ -0,0 +1,2 @@ +- name: Install python3-pwntools + win_command: pip install pwntools diff --git a/roles/python3/tasks/main_lin.yml b/roles/python3/tasks/main_lin.yml index 8c183df..8c13a70 100644 --- a/roles/python3/tasks/main_lin.yml +++ b/roles/python3/tasks/main_lin.yml @@ -10,3 +10,7 @@ - ipython3 state: latest +- name: Install generally useful libraries + apt: + name: + - python3-tqdm From 5f34e04926e1d255d5ac82853efa973d3f16e4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:33:37 +0200 Subject: [PATCH 45/66] Fix installation of extensions --- roles/vscode/tasks/main_lin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/vscode/tasks/main_lin.yml b/roles/vscode/tasks/main_lin.yml index 1989fff..9c5eab8 100644 --- a/roles/vscode/tasks/main_lin.yml +++ b/roles/vscode/tasks/main_lin.yml @@ -16,6 +16,6 @@ include_vars: vscode_extensions.yml - name: Install VS Code extensions - command: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension --force "{{ item }}" + command: code --no-sandbox --user-data-dir "/usr/share/code/resources/app" --extensions-dir "/usr/share/code/resources/app/extensions" --install-extension "{{ item }}" --force loop: "{{VSCode_Extensions}}" notify: fix VS code extensions From 6a6dabe4f420586bfc1ed650ff7bb5675e177a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:35:00 +0200 Subject: [PATCH 46/66] Add opam --- roles/ocaml/tasks/main_lin.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/ocaml/tasks/main_lin.yml b/roles/ocaml/tasks/main_lin.yml index 6695909..4d0e80c 100644 --- a/roles/ocaml/tasks/main_lin.yml +++ b/roles/ocaml/tasks/main_lin.yml @@ -2,3 +2,14 @@ apt: name: ocaml state: latest + +- name: Install opam + apt: + name: opam + state: latest + +- name: Init opam home + command: opam init --reinit --root=/opt/opam --dot-profile=/etc/profile.d/opam.sh --comp=4.14.2 -a + +- name: Install required opam packages + shell: source /etc/profile.d/opam.sh; eval $(opam env --root=/opt/opam --set-root --switch=4.14.2); opam install --yes ocaml-lsp-server odoc ocamlformat utop dune menhir From ca58fd58a1968c3a41bf5e430993fe324d84d286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:35:16 +0200 Subject: [PATCH 47/66] Add firewall rules for Vitis --- roles/vivado/tasks/main_win.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/vivado/tasks/main_win.yml b/roles/vivado/tasks/main_win.yml index 4640904..7288499 100644 --- a/roles/vivado/tasks/main_win.yml +++ b/roles/vivado/tasks/main_win.yml @@ -1 +1,10 @@ -# TODO +- name: Add firewall rules for Vitis + win_firewall_rule: + name: "Allow inbound traffic for Vitis: {{ item }}" + program: "{{ large_prog_dir }}\\{{ item }}" + action: allow + direction: in + protocol: tcp + loop: + - "xilinx\\2025.1\\vitis\\bin\\unwrapped\\win64.o\\hw_server.exe" + - "xilinx\\2025.1\\vitis\\bin\\unwrapped\\win64.o\\cs_server.exe" From 4c699269324127b55b74e08036241d7e82317019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:35:34 +0200 Subject: [PATCH 48/66] Create PulseView shortcut --- roles/pulseview/tasks/main_win.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/pulseview/tasks/main_win.yml b/roles/pulseview/tasks/main_win.yml index 1fa7568..bee6c08 100644 --- a/roles/pulseview/tasks/main_win.yml +++ b/roles/pulseview/tasks/main_win.yml @@ -10,6 +10,10 @@ path: "{{ download.dest }}" arguments: /S /Verysilent /AllUsers +- name: Create PulseView + win_shortcut: + src: "C:\\Program Files (x86)\\sigrok\\PulseView\\pulseview.exe" + dest: "C:\\Users\\Public\\Desktop\\PulseView.lnk" #- name: Remove temporary files # win_file: # path: "{{ download.dest }}" From 3e7b20423edfcf692b71ca179d64649677571187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:41:59 +0200 Subject: [PATCH 49/66] Fix cryptodome install --- roles/KRV-63528/meta/main.yml | 2 +- roles/cryptodome/tasks/main_lin.yml | 4 ++-- roles/cryptodome/tasks/main_win.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/KRV-63528/meta/main.yml b/roles/KRV-63528/meta/main.yml index d290c27..200842b 100644 --- a/roles/KRV-63528/meta/main.yml +++ b/roles/KRV-63528/meta/main.yml @@ -9,4 +9,4 @@ dependencies: - role: openssl - role: cryptodome - role: pwntools - - role: python + - role: python3 diff --git a/roles/cryptodome/tasks/main_lin.yml b/roles/cryptodome/tasks/main_lin.yml index 33ba5db..de920ed 100644 --- a/roles/cryptodome/tasks/main_lin.yml +++ b/roles/cryptodome/tasks/main_lin.yml @@ -1,5 +1,5 @@ -- name: Install python-cryptodome +- name: Install python-pycryptodome apt: name: - - python3-cryptodome + - python3-pycryptodome state: latest diff --git a/roles/cryptodome/tasks/main_win.yml b/roles/cryptodome/tasks/main_win.yml index 3cce942..1b9bc48 100644 --- a/roles/cryptodome/tasks/main_win.yml +++ b/roles/cryptodome/tasks/main_win.yml @@ -1,2 +1,2 @@ -- name: Install python3-cryptodome - win_command: pip install cryptodome +- name: Install python3-pycryptodome + win_command: pip install pycryptodome From 0f8f8486f083fac1cea443f989b95fb14fb9cc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:42:30 +0200 Subject: [PATCH 50/66] Add ml wrapper for smlnj --- roles/smlnj/files/ml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 roles/smlnj/files/ml diff --git a/roles/smlnj/files/ml b/roles/smlnj/files/ml new file mode 100644 index 0000000..31caf23 --- /dev/null +++ b/roles/smlnj/files/ml @@ -0,0 +1,2 @@ +#!/bin/bash +rlwrap sml "$@" From 09138174d48a344e2c6b2d815f326c7e06dbed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:43:10 +0200 Subject: [PATCH 51/66] Fix swap on linux+btrfs --- roles/fri_base/tasks/main_lin.yml | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 203ab5c..154d6ea 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -1,6 +1,55 @@ - name: Enable multiarch command: dpkg --add-architecture i386 +- name: Create swap btrfs subvolume + command: btrfs subvolume create /swap + ignore_errors: True + +- name: Create swap directory if it does not exist + file: + path: /swap + state: directory + +- name: Create btrfs swap + command: btrfs filesystem mkswapfile --size 4g /swap/swap.img + ignore_errors: True + +- name: Create swap image if it does not exist + shell: fallocate -l 4G /swap/swap.img && mkswap /swap/swap.img + args: + creates: /swap/swap.img + ignore_errors: True + +- name: Change swap file permissions + file: path="/swap/swap.img" + owner=root + group=root + mode=0600 + +- name: Write swap entry in fstab + mount: name=none + src=/swap/swap.img + fstype=swap + opts=sw + passno=0 + dump=0 + state=present + +- name: Activate swap + command: "swapon /swap/swap.img" + ignore_errors: True + +- name: Make sure default swap entry does not exist + mount: + path: none + src: /swap.img + fstype: swap + state: absent + +- name: Make sure default swap is not used + command: swapoff /swap/swap.img + ignore_errors: True + - name: Install generally useful packages apt: name: From 78e7df1fb12686bfe028b442c66dbfca96e2dc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Fri, 12 Sep 2025 15:45:32 +0200 Subject: [PATCH 52/66] Fix pulseview create link task name --- roles/pulseview/tasks/main_win.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pulseview/tasks/main_win.yml b/roles/pulseview/tasks/main_win.yml index bee6c08..469843f 100644 --- a/roles/pulseview/tasks/main_win.yml +++ b/roles/pulseview/tasks/main_win.yml @@ -10,7 +10,7 @@ path: "{{ download.dest }}" arguments: /S /Verysilent /AllUsers -- name: Create PulseView +- name: Create PulseView Shortcut win_shortcut: src: "C:\\Program Files (x86)\\sigrok\\PulseView\\pulseview.exe" dest: "C:\\Users\\Public\\Desktop\\PulseView.lnk" From eb4a2974ade0ab63e16fa614540749fa02d20558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Tue, 16 Sep 2025 15:47:41 +0200 Subject: [PATCH 53/66] Add firefox policies for Linux, merge them with windows --- roles/firefox/files/policies.json | 17 +++++++++++++++++ roles/firefox/tasks/main_lin.yml | 10 ++++++++++ roles/firefox/tasks/main_win.yml | 17 +---------------- 3 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 roles/firefox/files/policies.json diff --git a/roles/firefox/files/policies.json b/roles/firefox/files/policies.json new file mode 100644 index 0000000..1d48a1d --- /dev/null +++ b/roles/firefox/files/policies.json @@ -0,0 +1,17 @@ +{ + "policies": { + "OverrideFirstRunPage": "https://ucilnica.fri.uni-lj.si", + "OverridePostUpdatePage": "https://ucilnica.fri.uni-lj.si", + "DisableAppUpdate": true, + "DisableSystemAddonUpdate": true, + "DisableTelemetry": true, + "UserMessaging": { + "WhatsNew": false, + "ExtensionRecommendations": false, + "FeatureRecommendations": false, + "UrlbarInterventions": false, + "SkipOnboarding": true, + "MoreFromMozilla": false + } + } +} diff --git a/roles/firefox/tasks/main_lin.yml b/roles/firefox/tasks/main_lin.yml index 8cd61d2..fa3fd83 100644 --- a/roles/firefox/tasks/main_lin.yml +++ b/roles/firefox/tasks/main_lin.yml @@ -31,3 +31,13 @@ - firefox state: latest allow_downgrade: True + +- name: Create Firefox policies directory + file: + path: /etc/firefox/policies + state: directory + +- name: Set Firefox policies + copy: + dest: /etc/firefox/policies/policies.json + src: policies.json diff --git a/roles/firefox/tasks/main_win.yml b/roles/firefox/tasks/main_win.yml index 53987a9..a1c24b3 100644 --- a/roles/firefox/tasks/main_win.yml +++ b/roles/firefox/tasks/main_win.yml @@ -8,19 +8,4 @@ - name: Set Firefox policies copy: dest: C:\Program Files\Mozilla Firefox\distribution\policies.json - content: | - { - "policies": { - "DisableAppUpdate": true, - "DisableSystemAddonUpdate": true, - "DisableTelemetry": true, - "UserMessaging": { - "WhatsNew": false, - "ExtensionRecommendations": false, - "FeatureRecommendations": false, - "UrlbarInterventions": false, - "SkipOnboarding": true, - "MoreFromMozilla": false - } - } - } + src: policies.json From f1c8801774f7b6a143d409c09b6fb002b2462204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 25 Sep 2025 07:57:53 +0200 Subject: [PATCH 54/66] Add prometheus exporter --- roles/fri_base/meta/main.yml | 1 + roles/prometheus-exporter/tasks/main.yml | 4 ++++ roles/prometheus-exporter/tasks/main_lin.yml | 6 ++++++ roles/prometheus-exporter/tasks/main_win.yml | 3 +++ 4 files changed, 14 insertions(+) create mode 100644 roles/prometheus-exporter/tasks/main.yml create mode 100644 roles/prometheus-exporter/tasks/main_lin.yml create mode 100644 roles/prometheus-exporter/tasks/main_win.yml diff --git a/roles/fri_base/meta/main.yml b/roles/fri_base/meta/main.yml index ca40277..54b3e1e 100644 --- a/roles/fri_base/meta/main.yml +++ b/roles/fri_base/meta/main.yml @@ -9,3 +9,4 @@ dependencies: - role: sumatrapdf - role: vlc - role: wget + - role: prometheus-exporter diff --git a/roles/prometheus-exporter/tasks/main.yml b/roles/prometheus-exporter/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/prometheus-exporter/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/prometheus-exporter/tasks/main_lin.yml b/roles/prometheus-exporter/tasks/main_lin.yml new file mode 100644 index 0000000..be81aa8 --- /dev/null +++ b/roles/prometheus-exporter/tasks/main_lin.yml @@ -0,0 +1,6 @@ +- name: Install prometheus-exporter + apt: + name: + - prometheus-node-exporter + - prometheus-pushgateway + state: latest diff --git a/roles/prometheus-exporter/tasks/main_win.yml b/roles/prometheus-exporter/tasks/main_win.yml new file mode 100644 index 0000000..76d90ac --- /dev/null +++ b/roles/prometheus-exporter/tasks/main_win.yml @@ -0,0 +1,3 @@ +- name: Install prometheus exporter + win_chocolatey: + name: prometheus-windows-exporter.install From 7f57513b1cd790e7ecb86032a4fbb032c4d0fce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 25 Sep 2025 09:36:39 +0200 Subject: [PATCH 55/66] Fix SSH keys --- roles/fri_base/tasks/main_lin.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 154d6ea..801ade2 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -114,6 +114,8 @@ name: - xfce4-screensaver - xscreensaver + - thunderbird + - kmail state: absent - name: Set up additional groups for students @@ -217,6 +219,9 @@ line: greeter-hide-users=true - name: Copy authorized_keys - copy: - src: authorized_keys - dest: ~/.ssh/authorized_keys + become: false + ansible.posix.authorized_key: + user: "{{ ansible_user }}" + key: "{{ lookup('file', 'authorized_keys') }}" + state: present + exclusive: true From 02a44e918669f57ef43e749f63cb68c6e630e0e4 Mon Sep 17 00:00:00 2001 From: Timotej Lazar <timotej.lazar@fri.uni-lj.si> Date: Fri, 26 Sep 2025 09:53:22 +0200 Subject: [PATCH 56/66] =?UTF-8?q?prometheus-exporter:=20don=E2=80=99t=20in?= =?UTF-8?q?stall=20prometheus=20push=20gateway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not what it is for. --- roles/prometheus-exporter/tasks/main_lin.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/prometheus-exporter/tasks/main_lin.yml b/roles/prometheus-exporter/tasks/main_lin.yml index be81aa8..98b2923 100644 --- a/roles/prometheus-exporter/tasks/main_lin.yml +++ b/roles/prometheus-exporter/tasks/main_lin.yml @@ -2,5 +2,4 @@ apt: name: - prometheus-node-exporter - - prometheus-pushgateway state: latest From 8ca99c1f3ab7468e8cfa608e1904178bb8a946a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Mon, 29 Sep 2025 22:41:11 +0200 Subject: [PATCH 57/66] Fix mount options to allow symlinks, pipes in CIFS-mounted homes --- roles/ad_joined/files/pam_mount.conf.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ad_joined/files/pam_mount.conf.xml b/roles/ad_joined/files/pam_mount.conf.xml index a6d8570..73ecfb1 100644 --- a/roles/ad_joined/files/pam_mount.conf.xml +++ b/roles/ad_joined/files/pam_mount.conf.xml @@ -9,7 +9,7 @@ server="ucilnicesmb.fri1.uni-lj.si" path="profiles/%(DOMAIN_USER).%(DOMAIN_NAME)" mountpoint="~/" - options="sec=krb5i,cruid=%(USERUID)" + options="sec=krb5i,cruid=%(USERUID),nobrl,sfu,mfsymlinks" > <not> <or> From cccf0d86d12743230d42074542d255bfcc3ce0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Mon, 29 Sep 2025 23:15:20 +0200 Subject: [PATCH 58/66] Add it-polz public key to authorized keys --- roles/fri_base/files/authorized_keys | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/fri_base/files/authorized_keys b/roles/fri_base/files/authorized_keys index bffc05c..57dc2c0 100644 --- a/roles/fri_base/files/authorized_keys +++ b/roles/fri_base/files/authorized_keys @@ -2,3 +2,4 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM2Tn8+rH+fkFkBycxYrJ7TzhXQhuf3U+w23JFlZoRiX ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRpoWIH5u2g12IM39WNRzLsPksfSjfL/82fPnuZwZ7H polz@it-polz" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCq7NrrDD53pe9Zpn/dRSPxWQLDIZ9INS0kz/ps/9fGsM8/H/J7jr/ecj0j0jfYig6QdV8G7VnpLWjcuJ65ul3u2rnQSN78Ms/hxlAhmyahQtBA2q2D2zqI2PDWsKAySWmfFg+2W5fYmE1+F9GEB0OWNOuClmfo2A1c8Ve76qSiehHgjYo0G1CQrXkmE00GBLqyqkbyyStLa9DUfaDwrbOu4tJChHo4jDGuLH5QCYcN+RRXjwPQKgk0L2yfu1479L0XqhbEo+KHoIZH501fkoE+gUKVyLERvkhKSiCgPhJmAgRN1bRsiyTwvQzoED4q1RwFmG0AKg0U5bHnAAOd77uyuIYmcFiaRGHROQ9ZbyB9tJ07QrFlzRkderDd5Z18mO7LtgDjFZ2B2DlRY6zxMiUqJyDRnHjDF3+3DTlHIUCC3aEtoYS8MPyRL1b8XenIqswXkM+vkYFeKh2ynjNu3C6VqDCXZFvIi6f1X0ojZXRrDmbiON8Y74HjxP0z6TB1U30= polz@ucilnicenfs-2020 +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRpoWIH5u2g12IM39WNRzLsPksfSjfL/82fPnuZwZ7H polz@it-polz From 04c02ecbef26a0e8462e443eace5b62be5d6951f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Sat, 27 Sep 2025 09:17:27 +0200 Subject: [PATCH 59/66] Add hide users config for sddm --- roles/fri_base/files/hide_users.conf | 4 ++++ roles/fri_base/tasks/main_lin.yml | 30 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 roles/fri_base/files/hide_users.conf diff --git a/roles/fri_base/files/hide_users.conf b/roles/fri_base/files/hide_users.conf new file mode 100644 index 0000000..b3a9f7e --- /dev/null +++ b/roles/fri_base/files/hide_users.conf @@ -0,0 +1,4 @@ +[Users] +MinimumUid=999 +MaximumUid=999 +RememberLastUser=false diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 801ade2..f679c82 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -106,6 +106,7 @@ - okular - htop - jdupes + - snapper state: latest update_cache: yes @@ -118,6 +119,29 @@ - kmail state: absent +- name: Set volumes for snapper + set_fact: + snapper_volumes: + - { confname: 'root', subvolume: '/'} + - { confname: 'opt', subvolume: '/opt'} + +- name: Create snapper configs + command: snapper -c {{item.confname}} create-config {{item.subvolume}} + ignore_errors: true + loop: "{{snapper_volumes}}" + +- name: Overwrite snapper configs + template: + src: snapper + dest: /etc/snapper/configs/{{item.confname}} + loop: "{{ snapper_volumes }}" + +- name: Disable APT snapshots for snapper + lineinfile: + path: /etc/default/snapper + regexp: '^DISABLE_APT_SNAPSHOT=' + line: 'DISABLE_APT_SNAPSHOT="yes"' + - name: Set up additional groups for students vars: additional_groups: @@ -218,6 +242,12 @@ regexp: "#?greeter-hide-users=" line: greeter-hide-users=true +- name: Hide users in sddm + copy: + dest: /etc/sddm.conf.d/ + src: hide_users.conf + + - name: Copy authorized_keys become: false ansible.posix.authorized_key: From c1ade197c34336ba17b6b65d0768ad9f0af61ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Wed, 1 Oct 2025 15:19:40 +0200 Subject: [PATCH 60/66] Do not try to mount the home of lightdm; update blender, chromium non-snap repo, add wine64 --- roles/ad_joined/files/pam_mount.conf.xml | 1 + roles/blender/tasks/main_lin.yml | 36 +++++++++++++++++++++--- roles/blender/tasks/main_win.yml | 2 +- roles/chrome/tasks/main_lin.yml | 2 +- roles/fri_base/tasks/main_lin.yml | 1 + setup.yml | 10 ++++++- 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/roles/ad_joined/files/pam_mount.conf.xml b/roles/ad_joined/files/pam_mount.conf.xml index 73ecfb1..ab206be 100644 --- a/roles/ad_joined/files/pam_mount.conf.xml +++ b/roles/ad_joined/files/pam_mount.conf.xml @@ -15,6 +15,7 @@ <or> <user>local_admin</user> <user>root</user> + <user>lightdm</user> <sgrp>users</sgrp> </or> </not> diff --git a/roles/blender/tasks/main_lin.yml b/roles/blender/tasks/main_lin.yml index 7a3281e..9e82934 100644 --- a/roles/blender/tasks/main_lin.yml +++ b/roles/blender/tasks/main_lin.yml @@ -1,4 +1,32 @@ -- name: Install blender - apt: - name: blender - state: latest +#- name: Add blender PPA +# command: add-apt-repository -y ppa:savoury1/blender + +#- name: Add blender PPA +# apt_repository: +# repo: ppa:savoury1/blender +# state: present +# update_cache: True + +#- name: Install blender +# apt: +# name: blender +# state: latest +- name: Download and unpack blender + unarchive: + src: https://download.blender.org/release/Blender4.5/blender-4.5.3-linux-x64.tar.xz + dest: /usr/local/lib/ + remote_src: yes + creates: /usr/local/lib/blender-4.5.3-linux-x64/blender-launcher + +- name: Create blender symlink + file: + src: /usr/local/lib/blender-4.5.3-linux-x64/blender-launcher + dest: /usr/local/bin/blender + state: link + +- name: Copy blender .desktop file + copy: + src: "/usr/local/lib/blender-4.5.3-linux-x64/blender.desktop" + dest: "/usr/local/share/applications" + remote_src: yes + diff --git a/roles/blender/tasks/main_win.yml b/roles/blender/tasks/main_win.yml index 8985fd2..fa91d4f 100644 --- a/roles/blender/tasks/main_win.yml +++ b/roles/blender/tasks/main_win.yml @@ -1,3 +1,3 @@ - name: Install Blender win_package: - path: https://ftp.nluug.nl/pub/graphics/blender/release/Blender3.3/blender-3.3.0-windows-x64.msi + path: https://ftp.nluug.nl/pub/graphics/blender/release/Blender4.5/blender-4.5.3-windows-x64.msi diff --git a/roles/chrome/tasks/main_lin.yml b/roles/chrome/tasks/main_lin.yml index 5433e42..80bd014 100644 --- a/roles/chrome/tasks/main_lin.yml +++ b/roles/chrome/tasks/main_lin.yml @@ -1,7 +1,7 @@ - name: Add Chromium not-a-snap repository apt: deb: https://launchpad.net/~xtradeb/+archive/ubuntu/apps/+files/xtradeb-apt-source_0.4_all.deb - state: present + state: latest #apt_repository: # repo: ppa:xtradeb/apps diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index f679c82..84b92ed 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -73,6 +73,7 @@ - qemu-utils - virt-manager - wine + - wine64 - wine32:i386 - wine-binfmt - dosbox diff --git a/setup.yml b/setup.yml index 6d854ff..3fdbf55 100644 --- a/setup.yml +++ b/setup.yml @@ -15,7 +15,15 @@ - vars/software_keys.yml - vars/dirs.yml roles: - - all_classes + # - firefox + # - blender + - fri_base + # - vscode + # - smlnj + # - ocaml + # - vivado + # - pulseview + # - all_classes # - all_classes # - fri_base # - android_studio From 725737321dc863292b6aa90e31d7c844e32d3c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Wed, 1 Oct 2025 23:58:09 +0200 Subject: [PATCH 61/66] Fix broken display settings --- roles/ad_joined/tasks/main_win.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/ad_joined/tasks/main_win.yml b/roles/ad_joined/tasks/main_win.yml index f2de3a9..748036b 100644 --- a/roles/ad_joined/tasks/main_win.yml +++ b/roles/ad_joined/tasks/main_win.yml @@ -52,6 +52,16 @@ win_command: wuauclt.exe /updatenow ignore_errors: yes +- name: Fix broken display settings - start CDPSvc + win_regedit: + path: "{{item}}" + name: "Start" + type: dword + data: 0x00000002 + with_items: + - HKLM\SYSTEM\CurrentControlSet\Services\CDPSvc + - HKLM\SYSTEM\CurrentControlSet\Services\CDPUserSvc + - name: Reboot win_command: "shutdown /r" when: domain_state.reboot_required From d39dd739ca46273bc39ace859a37fe0363bb3eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 2 Oct 2025 12:20:10 +0200 Subject: [PATCH 62/66] Fix chromium repo, remove snap --- roles/chrome/tasks/main_lin.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/chrome/tasks/main_lin.yml b/roles/chrome/tasks/main_lin.yml index 80bd014..3d07a4f 100644 --- a/roles/chrome/tasks/main_lin.yml +++ b/roles/chrome/tasks/main_lin.yml @@ -1,13 +1,17 @@ - name: Add Chromium not-a-snap repository apt: deb: https://launchpad.net/~xtradeb/+archive/ubuntu/apps/+files/xtradeb-apt-source_0.4_all.deb - state: latest + state: present #apt_repository: # repo: ppa:xtradeb/apps # state: present # update_cache: True # validate_certs: False +- name: Remove Chromium snap + community.general.snap: + name: chromium + state: absent - name: Install Chromium instead of Chrome apt: From 61e9e019780cf1e1d7c683ded6eab81d87cdde22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 2 Oct 2025 12:20:53 +0200 Subject: [PATCH 63/66] Fix dconf so it works on network-mounted homes --- roles/fri_base/files/user.dconf | 1 + roles/fri_base/tasks/main_lin.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 roles/fri_base/files/user.dconf diff --git a/roles/fri_base/files/user.dconf b/roles/fri_base/files/user.dconf new file mode 100644 index 0000000..9cef8c7 --- /dev/null +++ b/roles/fri_base/files/user.dconf @@ -0,0 +1 @@ +service-db:keyfile/user diff --git a/roles/fri_base/tasks/main_lin.yml b/roles/fri_base/tasks/main_lin.yml index 84b92ed..fd34a57 100644 --- a/roles/fri_base/tasks/main_lin.yml +++ b/roles/fri_base/tasks/main_lin.yml @@ -62,7 +62,6 @@ - kwrite - kate - krita - - blender - inkscape - pcmanfm-qt - qutebrowser @@ -77,7 +76,6 @@ - wine32:i386 - wine-binfmt - dosbox - - snapper - htop - btop - iotop @@ -227,6 +225,15 @@ dest: /etc/udev/rules.d/ src: 99-wakeonlan.rules +- name: Put dconf files in XDG_RUNTIME_DIR so dconf works on network-mounted homes + block: + - file: + path: /etc/dconf/profile + state: directory + - copy: + dest: /etc/dconf/profile/user + src: user.dconf + - name: Shorten PS1 prompt replace: path: "{{ item }}" From 889083aee01a249575ee5e1a9d2aee2263e292b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 2 Oct 2025 16:34:13 +0200 Subject: [PATCH 64/66] Add .desktop files, update download links for JetBrains IDEs on Ubuntu --- roles/clion/files/clion.desktop | 11 ++++++++++ roles/clion/tasks/main_lin.yml | 32 +++++++++++++++++++++++++++++ roles/idea/files/idea.desktop | 11 ++++++++++ roles/idea/tasks/main_lin.yml | 24 ++++++++++++++++++++-- roles/pycharm/files/pycharm.desktop | 11 ++++++++++ roles/pycharm/tasks/main_lin.yml | 24 ++++++++++++++++++++-- 6 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 roles/clion/files/clion.desktop create mode 100644 roles/clion/tasks/main_lin.yml create mode 100644 roles/idea/files/idea.desktop create mode 100644 roles/pycharm/files/pycharm.desktop diff --git a/roles/clion/files/clion.desktop b/roles/clion/files/clion.desktop new file mode 100644 index 0000000..001239c --- /dev/null +++ b/roles/clion/files/clion.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=CLion +GenericName=CLion +Comment=JetBrains CLion IDE +MimeType=text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-moc;text/x-c;text/x-c++; +Exec=/opt/CLion/bin/clion.sh +Icon=clion +Terminal=false +Type=Application +Categories=Education;Development;ComputerScience; +StartupNotify=true diff --git a/roles/clion/tasks/main_lin.yml b/roles/clion/tasks/main_lin.yml new file mode 100644 index 0000000..6b33b9f --- /dev/null +++ b/roles/clion/tasks/main_lin.yml @@ -0,0 +1,32 @@ +- name: Install CLion + block: + - name: Create destination for JetBrains CLion + file: + path: /opt/CLion + state: directory + - name: Download and unpack JetBrains CLion + unarchive: + src: https://data.services.jetbrains.com/products/download?code=CL&platform=linux + dest: /opt/CLion + extra_opts: --strip-components=1 + creates: /opt/CLion/build.txt + remote_src: yes + +- name: Install icon + block: + - file: + path: /usr/local/share/icons + state: directory + - copy: + src: /opt/CLion/bin/clion.svg + remote_src: true + dest: /usr/local/share/icons/clion.svg + +- name: Create .desktop file + block: + - file: + path: /usr/local/share/applications + state: directory + - copy: + dest: /usr/local/share/applications/clion.desktop + src: clion.desktop diff --git a/roles/idea/files/idea.desktop b/roles/idea/files/idea.desktop new file mode 100644 index 0000000..1c69ffe --- /dev/null +++ b/roles/idea/files/idea.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=IDEA +GenericName=IDEA +Comment=JetBrains IDEA +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +Exec=/opt/IDEA/bin/idea.sh +Icon=idea +Terminal=false +Type=Application +Categories=Development;ComputerScience; +StartupNotify=true diff --git a/roles/idea/tasks/main_lin.yml b/roles/idea/tasks/main_lin.yml index 89023cd..e70fb5e 100644 --- a/roles/idea/tasks/main_lin.yml +++ b/roles/idea/tasks/main_lin.yml @@ -6,7 +6,27 @@ state: directory - name: Download and unpack JetBrains IDEA unarchive: - src: https://download.jetbrains.com/idea/ideaIC-2023.2.1.tar.gz + src: https://data.services.jetbrains.com/products/download?code=IIU&platform=linux dest: /opt/IDEA - creates: /opt/IDEA/idea-IC-232.9559.62/build.txt + extra_opts: --strip-components=1 + creates: /opt/IDEA/build.txt remote_src: yes + +- name: Install icon + block: + - file: + path: /usr/local/share/icons + state: directory + - copy: + src: /opt/IDEA/bin/idea.svg + remote_src: true + dest: /usr/local/share/icons/idea.svg + +- name: Create .desktop file + block: + - file: + path: /usr/local/share/applications + state: directory + - copy: + dest: /usr/local/share/applications/idea.desktop + src: idea.desktop diff --git a/roles/pycharm/files/pycharm.desktop b/roles/pycharm/files/pycharm.desktop new file mode 100644 index 0000000..5a90f0a --- /dev/null +++ b/roles/pycharm/files/pycharm.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=PyCharm +GenericName=PyCharm +Comment=JetBrains PyCharm IDE +MimeType=text/x-python; +Exec=/opt/PyCharm/bin/pycharm.sh +Icon=pycharm +Terminal=false +Type=Application +Categories=Development;ComputerScience; +StartupNotify=true diff --git a/roles/pycharm/tasks/main_lin.yml b/roles/pycharm/tasks/main_lin.yml index b85c36b..7e8fe1d 100644 --- a/roles/pycharm/tasks/main_lin.yml +++ b/roles/pycharm/tasks/main_lin.yml @@ -6,7 +6,27 @@ state: directory - name: Download and unpack JetBrains PyCharm unarchive: - src: https://download.jetbrains.com/python/pycharm-community-2023.2.1.tar.gz + src: https://data.services.jetbrains.com/products/download?code=PCP&platform=linux dest: /opt/PyCharm - creates: /opt/PyCharm/pycharm-community-2023.2.1/build.txt + extra_opts: --strip-components=1 + creates: /opt/PyCharm/build.txt remote_src: yes + +- name: Install icon + block: + - file: + path: /usr/local/share/icons + state: directory + - copy: + src: /opt/PyCharm/bin/pycharm.svg + remote_src: true + dest: /usr/local/share/icons/clion.svg + +- name: Create .desktop file + block: + - file: + path: /usr/local/share/applications + state: directory + - copy: + dest: /usr/local/share/applications/pycharm.desktop + src: pycharm.desktop From 7c4c3ac93e8e6bf7030f25713f1f15b7ee6db9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 2 Oct 2025 16:34:43 +0200 Subject: [PATCH 65/66] Add CLion --- roles/clion/tasks/main.yml | 4 ++++ roles/clion/tasks/main_win.yml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/clion/tasks/main.yml create mode 100644 roles/clion/tasks/main_win.yml diff --git a/roles/clion/tasks/main.yml b/roles/clion/tasks/main.yml new file mode 100644 index 0000000..3077b7e --- /dev/null +++ b/roles/clion/tasks/main.yml @@ -0,0 +1,4 @@ +- import_tasks: main_win.yml + when: ansible_os_family == 'Windows' +- import_tasks: main_lin.yml + when: ansible_os_family == 'Debian' diff --git a/roles/clion/tasks/main_win.yml b/roles/clion/tasks/main_win.yml new file mode 100644 index 0000000..f66ef50 --- /dev/null +++ b/roles/clion/tasks/main_win.yml @@ -0,0 +1,7 @@ + +# TODO fix / test this +- name: Install Clion + win_package: + path: "https://data.services.jetbrains.com/products/download?code=CL&platform=windows" + arguments: /S + creates_path: "%ProgramFiles(x86)%\\JetBrains\\IntelliJ IDEA Community Edition {{ target_version }}\\bin\\idea64.exe" From 0eaf4a5d40339d99b2f593b61f2bd0fe76431908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Fele-=C5=BDor=C5=BE?= <polz@fri.uni-lj.si> Date: Thu, 2 Oct 2025 16:35:06 +0200 Subject: [PATCH 66/66] Replace Pelles-C with CLion --- roles/PJC-63769/meta/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/PJC-63769/meta/main.yml b/roles/PJC-63769/meta/main.yml index 0c5fab1..caa2298 100644 --- a/roles/PJC-63769/meta/main.yml +++ b/roles/PJC-63769/meta/main.yml @@ -2,4 +2,4 @@ # Tomaz.Dobravec@fri.uni-lj.si # Windows, Pelles C dependencies: - - role: pelles-c + - role: clion