Compare commits

..

2 commits

Author SHA1 Message Date
3bf018bc38 Update roles/KCR-63550/meta/main.yml 2025-08-13 21:06:31 +00:00
76b14ee259 Update roles/KCR-63550/meta/main.yml 2025-08-13 21:05:35 +00:00
166 changed files with 397 additions and 2397 deletions

View file

@ -1,41 +1,5 @@
# Using the ansible scripts
Ansible playbooks for deploying classroom computers. Run with something like: Ansible playbooks for deploying classroom computers. Run with something like:
ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py ansible-playbook --user <local admin> -k -K -i inventory.yml setup.py
or, for Apple computers: 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
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, 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).
- 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).

View file

@ -1,19 +0,0 @@
- 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

View file

@ -1,8 +1,8 @@
- hosts: classroom - hosts: ucilnice-prototip
become_method: sudo become_method: sudo
become: true become: true
vars: vars:
# ansible_port: 1001 ansible_port: 1001
ansible_ssh_extra_args: '-o ForwardX11=yes' ansible_ssh_extra_args: '-o ForwardX11=yes'
# ansible_become_pass: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' # ansible_become_pass: '{{ lookup("env", "ANSIBLE_PASSWORD") }}'
# ansible_password: '{{ lookup("env", "ANSIBLE_PASSWORD") }}' # ansible_password: '{{ lookup("env", "ANSIBLE_PASSWORD") }}'
@ -12,8 +12,7 @@
- vars/credentials.yml - vars/credentials.yml
- vars/software_keys.yml - vars/software_keys.yml
roles: roles:
# - nodejs # - orange
# - qcadesigner-e
- all_classes - all_classes
# - fri_base # - fri_base
# - powerdesigner # - powerdesigner

View file

@ -1,8 +1,5 @@
# Digitalno načrtovanje # Digitalno načrtovanje
# ratko.pilipovic@fri.uni-lj.si # Nejc.Ilc@fri.uni-lj.si
# Windows, Vivado 2022.1 # Windows, Vivado 2022.1
dependencies: dependencies:
- role: vivado - role: vivado
- role: iverilog
- role: cocotb
- role: surfer-project

View file

@ -1,11 +1,8 @@
# Digitalno procesiranje signalov # Digitalno procesiranje signalov
# Aleks.Huc@fri.uni-lj.si # Aleks.Huc@fri.uni-lj.si
# metod.celestina@dewesoft.si
# Windows, GNU/Linux, Matlab, wfdb, Octave, Audacity # Windows, GNU/Linux, Matlab, wfdb, Octave, Audacity
dependencies: dependencies:
- role: matlab - role: matlab
- role: wfdb - role: wfdb
- role: octave - role: octave
- role: audacity - role: audacity
- role: numpy
- role: matplotlib

View file

@ -1,8 +1,6 @@
# Komunikacija človek računalnik # Komunikacija človek računalnik
# Ales.Smrdel@fri.uni-lj.si # Ciril.Bohak@fri.uni-lj.si
# Java JDK, Matlab, wfdb, Apache NetBeans # Luka.Cehovin@fri.uni-lj.si
# vscode
dependencies: dependencies:
- role: jdk - role: vscode
- role: matlab
- role: wfdb
- role: netbeans

View file

@ -5,8 +5,5 @@
# SageMath se se prevede za Ubutnu 24.04: https://github.com/sagemath/sage/issues/38051#issuecomment-2123452861 # SageMath se se prevede za Ubutnu 24.04: https://github.com/sagemath/sage/issues/38051#issuecomment-2123452861
# - include_tasks: sagemath.yml # - include_tasks: sagemath.yml
dependencies: dependencies:
- role: jupyter - role: jupyter.yml
- role: openssl - role: openssl.yml
- role: cryptodome
- role: pwntools
- role: python3

View file

@ -1,10 +1,10 @@
# Načrtovanje digitalnih naprav # Načrtovanje digitalnih naprav
# Miran.Koprivec@fri.uni-lj.si, Miha.Moskon@fri.uni-lj.si, ratko.pilipovic@fri.uni-lj.si # 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
# Windows, Vivado 2022.1 # Windows, Vivado 2022.1
dependencies: dependencies:
- role: putty - role: putty
- role: vivado - role: vivado
- role: cp2102_driver - role: cp2102_driver
- role: cocotb
- role: iverilog
- role: surfer-project

View file

@ -3,7 +3,7 @@
# Windows, Logisim, Logisim Evolution, RAVINOR, CubeIDE + Tools, VSCode + ST plugin, Putty # Windows, Logisim, Logisim Evolution, RAVINOR, CubeIDE + Tools, VSCode + ST plugin, Putty
dependencies: dependencies:
- role: logisim - role: logisim
# - role: stm32cube - role: stm32cube
- role: vscode - role: vscode
- role: putty - role: putty
- role: stm32duino - role: stm32duino

View file

@ -6,4 +6,3 @@ dependencies:
- role: gedit - role: gedit
- role: mono - role: mono
- role: vscode - role: vscode
- role: notepad++

View file

@ -2,4 +2,4 @@
# Tomaz.Dobravec@fri.uni-lj.si # Tomaz.Dobravec@fri.uni-lj.si
# Windows, Pelles C # Windows, Pelles C
dependencies: dependencies:
- role: clion - role: pelles-c

View file

@ -1,18 +0,0 @@
# 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

View file

@ -2,7 +2,7 @@
# Ziga.Pusnik@fri.uni-lj.si, Robert.Rozman@fri.uni-lj.si # Ziga.Pusnik@fri.uni-lj.si, Robert.Rozman@fri.uni-lj.si
# Windows, CubeIDE + tools, STMDuino, VSCode, WinIdea 9.21 + GCC + QEMU, Visual2 # Windows, CubeIDE + tools, STMDuino, VSCode, WinIdea 9.21 + GCC + QEMU, Visual2
dependencies: dependencies:
# - role: stm32cube # (CubeMonitor sem vzel samo exe) - role: stm32cube (CubeMonitor sem vzel samo exe)
- role: stm32duino - role: stm32duino
- role: vscode - role: vscode
- role: putty - role: putty
@ -10,7 +10,6 @@ dependencies:
- role: gcc-arm - role: gcc-arm
- role: git - role: git
- role: visual2 - role: visual2
# - role: winidea-frisms
#TODO Writable d:\RAVINOR directory #TODO Writable d:\RAVINOR directory

View file

@ -2,14 +2,13 @@
# Robert.Rozman@fri.uni-lj.si # Robert.Rozman@fri.uni-lj.si
# Windows, CubeIDE + Tools, STMDuino, VSCode, LTSpice, PulseView,Putty, STM32 Algobuilder & Unicleo GUI # Windows, CubeIDE + Tools, STMDuino, VSCode, LTSpice, PulseView,Putty, STM32 Algobuilder & Unicleo GUI
dependencies: dependencies:
#- role: stm32cube - role: stm32cube
- role: stm32duino - role: stm32duino
- role: vscode - role: vscode
- role: ltspice - role: ltspice
- role: pulseview - role: pulseview
- role: putty - role: putty
- role: stm32mems-studio # replaces algobuilder and unicleogui - role: stm32algobuilder #(ni še exe. Datoteke - ne dobim iz ST portala)
# - role: stm32algobuilder #(ni še exe. Datoteke - ne dobim iz ST portala) - role: stm32unicleogui
# - role: stm32unicleogui
#TODO Writable d:\RAVINOR directory #TODO Writable d:\RAVINOR directory

View file

@ -14,5 +14,4 @@ dependencies:
- role: jdk - role: jdk
- role: jupyter - role: jupyter
- role: pycharm - role: pycharm
- role: cryptography
- role: flask - role: flask

View file

@ -1,3 +0,0 @@
[Service]
Type=forking
ExecStart=/usr/bin/k5start -f /etc/krb5.keytab -U -k /tmp/krb5cc_0 -o root -b -K 60 -v -L

View file

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<!-- Example using CIFS -->
<debug enable="0" />
<volume
fstype="cifs"
server="ucilnicesmb.fri1.uni-lj.si"
path="profiles/%(DOMAIN_USER).%(DOMAIN_NAME)"
mountpoint="~/"
options="sec=krb5i,cruid=%(USERUID),nobrl,sfu,mfsymlinks,dir_mode=0700,file_mode=0700,cache=loose,nostrictsync"
>
<not>
<or>
<user>local_admin</user>
<user>root</user>
<user>lightdm</user>
<sgrp>users</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>users</sgrp>
</or>
</not>
</volume> -->
</pam_mount>

View file

@ -1,40 +1,25 @@
- name: Install required packages - name: Enable create homedir on login
apt: command: pam-auth-update --enable mkhomedir
name: become: true
- realmd
- sssd
- libpam-mount
- kstart
- 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}}-linux"
register: hostname_res
- name: Check whether we already joined - name: Check whether we already joined
command: /bin/bash -c "/usr/sbin/realm list" command: /bin/bash -c "/usr/sbin/realm list"
register: realm_list_results 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 - name: Join using realmd
expect: expect:
command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} {{domain_name}} command: realm join --user={{ad_join_user}} --computer-ou={{ou_path}} FRI1.UNI-LJ.SI
responses: responses:
(?i)Password: "{{ad_join_password}}" (?i)Password: "{{ad_join_password}}"
ignore_errors: yes ignore_errors: yes
@ -47,39 +32,3 @@
owner: root owner: root
mode: 0600 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: Create kstart service
copy:
src: kstart.service
dest: /etc/systemd/system/kstart.service
- name: Start kstart service to enable cifs mount
copy:
src: kstart.service
dest: /etc/systemd/system/kstart.service
- name: Add mount - cifs_home
mount:
boot: true
fstype: cifs
src: "//ucilnicesmb.fri1.uni-lj.si/ucilnice_d"
path: /mnt/cifs_home
state: mounted
opts: "cruid=0,username={{ inventory_hostname }}-linux@FRI1.UNI-LJ.SI,sec=krb5i,nobrl,sfu,nostrictsync,cache=loose,mfsymlinks,dir_mode=0700,file_mode=0700,fsc,multiuser,x-systemd.requires=kstart.service"
- name: Restart sssd
service:
name: sssd
state: restarted

View file

@ -1,22 +1,18 @@
- name: Set OU - name: Set OU
set_fact: set_fact:
ou_path: "OU={{locations[0]}},OU=Ucilnice,DC=fri1,DC=uni-lj,DC=si" ou_path: "OU={{locations[0]}},OU=Ucilnice,DC=fri1,DC=uni-lj,DC=si"
- name: "Rename" - name: "Rename"
# Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom # Racunalnik najprej preimenujmo, da ne bosta v domeni obenem 2 z istim imenom
win_hostname: win_hostname:
name: "{{inventory_hostname}}" name: "{{inventory_hostname}}"
register: hostname_res register: hostname_res
- name: "Reboot after hostname change" - name: "Reboot after hostname change"
win_reboot: win_reboot:
when: hostname_res.reboot_required when: hostname_res.reboot_required
- name: Stop Windows Update Service - name: Stop Windows Update Service
win_service: win_service:
name: wuauserv name: wuauserv
state: stopped state: stopped
- name: Clear WSUS ID from registry - name: Clear WSUS ID from registry
win_regedit: win_regedit:
path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate path: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate
@ -28,40 +24,25 @@
- AccountDomainSid - AccountDomainSid
- SusClientId - SusClientId
- SusClientIDValidation - SusClientIDValidation
- name: Start Windows Update Service - name: Start Windows Update Service
win_service: win_service:
name: wuauserv name: wuauserv
state: started state: started
- name: "Join domain" - name: "Join domain"
win_domain_membership: win_domain_membership:
domain_admin_user: "{{ad_join_user}}" domain_admin_user: "{{adjoin_user}}"
domain_admin_password: "{{ad_join_password}}" domain_admin_password: "{{adjoin_password}}"
dns_domain_name: "{{domain_name}}" dns_domain_name: "{{domain_name}}"
domain_ou_path: "{{ou_path}}" domain_ou_path: "{{ou_path}}"
hostname: "{{inventory_hostname}}" hostname: "{{inventory_hostname}}"
state: domain state: domain
register: domain_state register: domain_state
- name: Reset WSUS authorization - name: Reset WSUS authorization
win_command: wuauclt.exe /resetauthorization /detectnow win_command: wuauclt.exe /resetauthorization /detectnow
ignore_errors: yes ignore_errors: yes
- name: Update windows - name: Update windows
win_command: wuauclt.exe /updatenow win_command: wuauclt.exe /updatenow
ignore_errors: yes 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 - name: Reboot
win_command: "shutdown /r" win_command: "shutdown /r"
when: domain_state.reboot_required when: domain_state.reboot_required

View file

@ -1 +0,0 @@
@{HOMEDIRS}+=/home/profiles/

View file

@ -3,7 +3,6 @@ config_file_version = 2
domains = fri1.uni-lj.si domains = fri1.uni-lj.si
enable_files_domain = False enable_files_domain = False
services = nss, pam services = nss, pam
default_domain_suffix = student.uni-lj.si
[nss] [nss]
filtered_groups = root filtered_groups = root
@ -28,12 +27,5 @@ krb5_store_password_if_offline = True
default_shell = /bin/bash default_shell = /bin/bash
ldap_id_mapping = True ldap_id_mapping = True
use_fully_qualified_names = True use_fully_qualified_names = True
full_name_format = %1$s@%3$s fallback_homedir = /home/%u@%d
# fallback_homedir = /home/%u@%d
fallback_homedir = /home/profiles/%u.%F
subdomain_homedir = /home/profiles/%u.%F
access_provider = ad access_provider = ad
krb5_ccname_template = FILE:%d/krb5cc_%U
krb5_lifetime = 86400
krb5_renewable_lifetime = 604800
krb5_renew_interval = 7200

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install altair
apt:
name: python3-altair
state: latest

View file

@ -1,2 +0,0 @@
- name: Install altair
win_command: pip install altair

View file

@ -2,8 +2,9 @@ AndroidSDK_packages:
- add-ons;addon-google_apis-google-24 - add-ons;addon-google_apis-google-24
- add-ons;addon-google_apis-google-24 - add-ons;addon-google_apis-google-24
- build-tools;34.0.0-rc3 - build-tools;34.0.0-rc3
- build-tools;36.0.0 - build-tools;35.0.0
- cmake;4.0.3 - cmake;3.22.1
#- cmake;latest
- cmdline-tools;latest - cmdline-tools;latest
- emulator - emulator
- extras;android;m2repository - extras;android;m2repository
@ -21,15 +22,15 @@ AndroidSDK_packages:
# - patcher;v4 # - patcher;v4
- platform-tools - platform-tools
- platforms;android-34 - platforms;android-34
- platforms;android-36 - platforms;android-35
- platforms;android-32 - platforms;android-32
# - platforms;android-UpsideDownCakePrivacySandbox - platforms;android-UpsideDownCakePrivacySandbox
- skiaparser;3 - skiaparser;3
- sources;android-36 - sources;android-35
- sources;android-34 - sources;android-34
- system-images;android-36;google_apis;x86_64 - system-images;android-35;google_apis;x86_64
- system-images;android-34;google_apis;x86_64 - system-images;android-34;google_apis;x86_64
- system-images;android-32;google_apis;x86_64 - system-images;android-32;google_apis;x86_64
- system-images;android-36;google_apis_playstore;x86_64 - system-images;android-35;google_apis_playstore;x86_64
- system-images;android-34;google_apis_playstore;x86_64 - system-images;android-34;google_apis_playstore;x86_64
# - system-images;android-UpsideDownCakePrivacySandbox;google_apis_playstore;x86_64 - system-images;android-UpsideDownCakePrivacySandbox;google_apis_playstore;x86_64

View file

@ -1,102 +1,63 @@
- name: Set Android Studio version - name: Set Android Studio version
set_fact: set_fact:
studio_path: "{{ large_prog_dir }}\\android-studio" sdk_path: C:\android-sdk
sdk_path: "{{ large_prog_dir }}\\android-sdk" studio_version: "2025.1.2.11"
studio_version: "2025.1.2.13" tools_version: "latest"
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 - name: Check Android Studio tools
win_stat: win_stat:
path: "{{ tools_path }}\\bin\\sdkmanager.bat" path: "{{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager.bat"
register: tools register: tools
- when: not tools.stat.exists - when: not tools.stat.exists
block: block:
- name: Download Android Studio tools - name: Download Android Studio tools
win_get_url: win_get_url:
url: "https://dl.google.com/android/repository/commandlinetools-win-{{ tools_version }}.zip" # 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" url: "https://dl.google.com/android/repository/platform-tools-{{ tools_version }}-windows.zip"
dest: "{{ studio_path }}" dest: C:\
- name: Extract Android Studio tools - name: Extract Android Studio tools
win_unzip: win_unzip:
# src: "{{ large_prog_dir }}\\platform-tools-{{ tools_version }}-windows.zip" src: "C:\\commandlinetools-win-{{ tools_version }}.zip"
src: "{{ studio_path}}\\commandlinetools-win-{{ tools_version }}.zip" dest: "{{ sdk_path }}\\cmdline-tools"
dest: "{{ studio_path }}\\cmdline-tools\\"
delete_archive: yes 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 - name: Accept Android SDK licenses
win_file: win_shell: sh -c "yes | /c/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager.bat --licenses"
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: "{{ sdk_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"
- name: Include Android SDK packages - name: Include Android SDK packages
include_vars: androidsdk_packages.yml include_vars: androidsdk_packages.yml
- name: Install Android SDK packages - name: Install Android SDK
win_shell: | win_shell: |
{{ tools_path }}\bin\sdkmanager.bat --install "{{ item }}" {{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager --install "{{ item }}"
loop: "{{ AndroidSDK_packages }}" loop: "{{ AndroidSDK_packages }}"
# {{ sdk_path }}\\cmdline-tools\\cmdline-tools\\bin\\sdkmanager --install "{{ AndroidSDK_packages | join(' ') }}" # {{ 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" # {{ 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 - name: Install Android Studio
# win_package: win_package:
# path: "https://redirector.gvt1.com/edgedl/android/studio/install/{{ studio_version }}/android-studio-{{ studio_version }}-windows.exe" path: "https://redirector.gvt1.com/edgedl/android/studio/install/{{ studio_version }}/android-studio-{{ studio_version }}-windows.exe"
# arguments: /S /AllUsers arguments: /S /AllUsers
# expected_return_code: [0, 1223, 3010] expected_return_code: [0, 1223, 3010]
# creates_path: "%ProgramFiles%\\Android\\Android Studio\\bin\\studio64.exe" 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: Check HAXM install status #- name: Check HAXM install status
# win_stat: # win_stat:
# path: "%ProgramFiles%\\Intel\\HAXM" # path: "%ProgramFiles%\\Intel\\HAXM"

View file

@ -8,9 +8,8 @@
- name: Install Arduino-cli - name: Install Arduino-cli
win_package: win_package:
# path: https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0_Windows_64bit.exe # path: https://downloads.arduino.cc/arduino-ide/arduino-ide_2.0.0_Windows_64bit.exe
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
# path: https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip arguments: /S /AllUsers
# arguments: /S /AllUsers
# creates_path: "%ProgramFiles%\\Arduino IDE\\Arduino IDE.exe" # creates_path: "%ProgramFiles%\\Arduino IDE\\Arduino IDE.exe"

View file

@ -1,9 +0,0 @@
[Unit]
Description=Update btrfs filesystems
[Service]
User=root
Group=root
Type=oneshot
ExecStart=/home/partimag/fri_live_upgrade/frib_update.py

View file

@ -1,12 +0,0 @@
[Unit]
Description=Frib Autoupdate Timer
[Timer]
OnBootSec=5m
OnUnitActiveSec=30m
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -1,9 +0,0 @@
[Unit]
Description=rsync D:
[Service]
User=root
Group=root
Type=oneshot
ExecStart=/bin/bash /mnt/ucilnice_d/skupno/porini_na_d.sh

View file

@ -1,12 +0,0 @@
[Unit]
Description=Rsync D: timer
[Timer]
OnBootSec=5m
OnUnitActiveSec=30m
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,39 +0,0 @@
- name: Create frib_autoupdate systemd unit
ansible.builtin.copy:
src: frib_autoupdate.service
dest: /etc/systemd/system/
owner: root
group: root
- name: Create frib_autoupdate timer
ansible.builtin.copy:
src: frib_autoupdate.timer
dest: /etc/systemd/system/
owner: root
group: root
- name: Enable frib_autoupdate timer
ansible.builtin.systemd_service:
name: frib_autoupdate.timer
state: started
enabled: true
- name: Create rsync_ucilnicesmb_d systemd unit
ansible.builtin.copy:
src: rsync_ucilnicesmb_d.service
dest: /etc/systemd/system/
owner: root
group: root
- name: Create rsync_ucilnicesmb_d timer
ansible.builtin.copy:
src: rsync_ucilnicesmb_d.timer
dest: /etc/systemd/system/
owner: root
group: root
- name: Enable rsync_ucilnicesmb_d timer
ansible.builtin.systemd_service:
name: rsync_ucilnicesmb_d.timer
state: started
enabled: true

View file

@ -1 +0,0 @@

View file

@ -1,32 +1,4 @@
#- name: Add blender PPA - name: Install blender
# command: add-apt-repository -y ppa:savoury1/blender apt:
name: blender
#- name: Add blender PPA state: latest
# 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

View file

@ -1,3 +1,3 @@
- name: Install Blender - name: Install Blender
win_package: win_package:
path: https://ftp.nluug.nl/pub/graphics/blender/release/Blender4.5/blender-4.5.3-windows-x64.msi path: https://ftp.nluug.nl/pub/graphics/blender/release/Blender3.3/blender-3.3.0-windows-x64.msi

View file

@ -1,17 +1,9 @@
- name: Add Chromium not-a-snap repository - name: Add Chromium not-a-snap repository
apt: apt_repository:
deb: https://launchpad.net/~xtradeb/+archive/ubuntu/apps/+files/xtradeb-apt-source_0.4_all.deb repo: ppa:xtradeb/apps
state: present state: present
update_cache: True
#apt_repository: validate_certs: False
# 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 - name: Install Chromium instead of Chrome
apt: apt:

View file

@ -1,11 +0,0 @@
[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

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,32 +0,0 @@
- 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

View file

@ -1,7 +0,0 @@
# 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"

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install Cocotb
pip:
executable: pipx
name: cocotb[bus]

View file

@ -1,2 +0,0 @@
- name: Install cocoTB
win_command: pip install cocotb[bus]

View file

@ -2,5 +2,3 @@
win_chocolatey: win_chocolatey:
ignore_checksums: true ignore_checksums: true
name: cp210x-vcp-drivers-win10 name: cp210x-vcp-drivers-win10
#TODO remove ignore_errors once the package is repaired/updated
ignore_errors: true

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,5 +0,0 @@
- name: Install python-pycryptodome
apt:
name:
- python3-pycryptodome
state: latest

View file

@ -1,2 +0,0 @@
- name: Install python3-pycryptodome
win_command: pip install pycryptodome

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,5 +0,0 @@
- name: Install python-cryptography
apt:
name:
- python3-cryptography
state: latest

View file

@ -1,2 +0,0 @@
- name: Install python3-cryptography
win_command: pip install cryptography

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install datasets
pip:
executable: pipx
name: datasets

View file

@ -1,2 +0,0 @@
- name: Install datasets
win_command: pip install datasets

View file

@ -12,4 +12,4 @@
win_lineinfile: win_lineinfile:
path: "%ProgramFiles%\\Eclipse {{ target_version }}\\eclipse\\eclipse.ini" path: "%ProgramFiles%\\Eclipse {{ target_version }}\\eclipse\\eclipse.ini"
regexp: "osgi.instance.area.default" regexp: "osgi.instance.area.default"
line: "-Dosgi.instance.area.default=D:/Documents/eclipse-workspace" line: "-Dosgi.instance.area.default=H:/Documents/eclipse-workspace"

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install evaluate
pip:
executable: pipx
name: evaluate

View file

@ -1,2 +0,0 @@
- name: Install evaluate
win_command: pip install evaluate

View file

@ -1,21 +1,31 @@
- name: Send valid bash or ps command with different results - name: Try connecting to linux
raw: | ping:
echo \#\# register: lin_ping_data
register: raw_result ignore_unreachable: true
ignore_errors: true
- name: Set shell type - name: Set shell to powershell
set_fact: set_fact:
ansible_shell_type: "{% if raw_result['stdout'][-4] == '#' %}sh{% else %}powershell{%endif%}" ansible_shell_type: powershell
when: lin_ping_data is undefined or lin_ping_data.unreachable is defined
- name: Try connecting to windows
win_ping:
register: win_ping_data
ignore_unreachable: true
ignore_errors: true
- name: Set connection parameters and paths for Windows - name: Set connection parameters and paths for Windows
become: false become: false
set_fact: set_fact:
ansible_shell_type: powershell
ansible_connection: ssh
ansible_become_method: runas ansible_become_method: runas
ansible_become_flags: "" ansible_become_flags: ""
ansible_become_user: "{{ windows_user }}" ansible_become_user: "{{ windows_user }}"
logon_type: interactive logon_type: interactive
installers: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install installers: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install
when: ansible_shell_type == "powershell" when: win_ping_data is defined and win_ping_data.ping is defined
- name: Set connection parameters and paths for Ubuntu - name: Set connection parameters and paths for Ubuntu
set_fact: set_fact:
@ -23,4 +33,4 @@
ansible_become_flags: "" ansible_become_flags: ""
ansible_ssh_extra_args: '-o ForwardX11=yes' ansible_ssh_extra_args: '-o ForwardX11=yes'
installers: /mnt/ucilnice_d/install installers: /mnt/ucilnice_d/install
when: ansible_shell_type == "sh" when: lin_ping_data is defined and lin_ping_data.ping is defined

View file

@ -1,17 +0,0 @@
{
"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
}
}
}

View file

@ -1,21 +1,5 @@
- name: Add Firefox not-a-snap repository - name: Add Firefox not-a-snap repository
block: block:
- name: add Mozilla apt key
ansible.builtin.get_url:
url: https://packages.mozilla.org/apt/repo-signing-key.gpg
dest: /etc/apt/keyrings/packages.mozilla.org.asc
- name: add Mozilla apt source
ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main"
state: present
#- name: Add Firefox PPA
# apt_repository:
# repo: ppa:mozillateam/ppa
# state: present
# update_cache: True
# validate_certs: False
- name: Pin Firefox PPA package priority - name: Pin Firefox PPA package priority
template: template:
src: mozilla-firefox-apt-preferences src: mozilla-firefox-apt-preferences
@ -24,6 +8,12 @@
template: template:
src: mozilla-firefox-unattended-upgrades src: mozilla-firefox-unattended-upgrades
dest: /etc/apt/apt.conf.d/51unattended-upgrades-firefox dest: /etc/apt/apt.conf.d/51unattended-upgrades-firefox
- name: Add Firefox PPA
apt_repository:
repo: ppa:mozillateam/ppa
state: present
update_cache: True
validate_certs: False
- name: Install Firefox - name: Install Firefox
apt: apt:
@ -31,13 +21,3 @@
- firefox - firefox
state: latest state: latest
allow_downgrade: True 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

View file

@ -8,4 +8,19 @@
- name: Set Firefox policies - name: Set Firefox policies
copy: copy:
dest: C:\Program Files\Mozilla Firefox\distribution\policies.json dest: C:\Program Files\Mozilla Firefox\distribution\policies.json
src: policies.json content: |
{
"policies": {
"DisableAppUpdate": true,
"DisableSystemAddonUpdate": true,
"DisableTelemetry": true,
"UserMessaging": {
"WhatsNew": false,
"ExtensionRecommendations": false,
"FeatureRecommendations": false,
"UrlbarInterventions": false,
"SkipOnboarding": true,
"MoreFromMozilla": false
}
}
}

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,7 +0,0 @@
- name: Install flask
apt:
name:
- python3-flask
- python-flask-doc
state: latest

View file

@ -1,5 +0,0 @@
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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRpoWIH5u2g12IM39WNRzLsPksfSjfL/82fPnuZwZ7H polz@it-polz

View file

@ -1,4 +0,0 @@
[Users]
MinimumUid=999
MaximumUid=999
RememberLastUser=false

View file

@ -1,4 +0,0 @@
[Daemon]
Autolock=false
LockOnResume=false
Timeout=0

View file

@ -1,6 +0,0 @@
[AC][RunScript]
IdleTimeoutCommand=qdbus org.kde.Shutdown /Shutdown logout
RunScriptIdleTimeoutSec=7200
[AC][SuspendAndShutdown]
PowerButtonAction=8

View file

@ -1 +0,0 @@
service-db:keyfile/user

View file

@ -9,4 +9,3 @@ dependencies:
- role: sumatrapdf - role: sumatrapdf
- role: vlc - role: vlc
- role: wget - role: wget
- role: prometheus-exporter

View file

@ -1,55 +1,6 @@
- name: Enable multiarch - name: Enable multiarch
command: dpkg --add-architecture i386 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 - name: Install generally useful packages
apt: apt:
name: name:
@ -62,6 +13,7 @@
- kwrite - kwrite
- kate - kate
- krita - krita
- blender
- inkscape - inkscape
- pcmanfm-qt - pcmanfm-qt
- qutebrowser - qutebrowser
@ -72,13 +24,9 @@
- qemu-utils - qemu-utils
- virt-manager - virt-manager
- wine - wine
- wine64
- wine32:i386 - wine32:i386
- wine-binfmt - wine-binfmt
- dosbox - dosbox
- htop
- btop
- iotop
# - webext-ublock-origin-chromium # - webext-ublock-origin-chromium
# - webext-ublock-origin-firefox # - webext-ublock-origin-firefox
- nethack-console - nethack-console
@ -101,11 +49,8 @@
- neovim-qt - neovim-qt
- binwalk - binwalk
- iotop - iotop
- evince
- okular
- htop - htop
- jdupes - jdupes
- nvidia-driver-580-open
state: latest state: latest
update_cache: yes update_cache: yes
@ -114,33 +59,8 @@
name: name:
- xfce4-screensaver - xfce4-screensaver
- xscreensaver - xscreensaver
- thunderbird
- kmail
state: absent 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 - name: Set up additional groups for students
vars: vars:
additional_groups: additional_groups:
@ -180,7 +100,7 @@
mount: mount:
boot: true boot: true
fstype: ntfs-3g fstype: ntfs-3g
src: "PARTLABEL=Basic\\040data\\040partition" src: UUID=A09E30889E30594C
path: /mnt/C path: /mnt/C
state: mounted state: mounted
opts: defaults,nofail opts: defaults,nofail
@ -189,7 +109,7 @@
mount: mount:
boot: true boot: true
fstype: ntfs-3g fstype: ntfs-3g
src: "PARTLABEL=D:" src: "LABEL=D:"
path: /mnt/D path: /mnt/D
state: mounted state: mounted
opts: defaults,nofail opts: defaults,nofail
@ -224,58 +144,3 @@
copy: copy:
dest: /etc/udev/rules.d/ dest: /etc/udev/rules.d/
src: 99-wakeonlan.rules 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: Turn off KDE screen locking
copy:
dest: /etc/xdg
src: kscreenlockerrc
- name: Log off KDE after 120m
copy:
dest: /etc/xdg
src: powerdevilrc
- name: Shorten PS1 prompt
replace:
path: "{{ item }}"
regexp: 'PS1=(.*)\\u@\\h'
replace: PS1=\1${USER%@*}
loop:
- /etc/skel/.bashrc
- /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: Hide users in sddm
copy:
dest: /etc/sddm.conf.d/
src: hide_users.conf
- name: Prevent sddm from enumerating all users
lineinfile:
path: /usr/share/sddm/themes/breeze/metadata.desktop
insertafter: EOF
state: present
line: needsFullUserModel=false
- name: Copy authorized_keys
become: false
ansible.posix.authorized_key:
user: "{{ ansible_user }}"
key: "{{ lookup('file', 'authorized_keys') }}"
state: present
exclusive: true

View file

@ -36,15 +36,5 @@
allow_clobber: true allow_clobber: true
state: present 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: turn on GPO to allow guest SMB logins
# TODO: open firewall for Samba # TODO: open firewall for Samba

View file

@ -1,23 +1,9 @@
- name: Add GNS3 repository - name: Add GNS3 repository
block: apt_repository:
- name: add GNS3 apt key repo: ppa:gns3/ppa
ansible.builtin.get_url: state: present
url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb83aaabffbd82d21b543c8ea86c22c2ec6a24d7f update_cache: True
dest: /etc/apt/keyrings/gns3-ppa.asc validate_certs: False
- name: add GNS3 apt deb source
ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/gns3-ppa.asc] https://ppa.launchpadcontent.net/gns3/ppa/ubuntu {{ ansible_distribution_release }} main "
state: present
- name: add GNS3 apt deb-src source
ansible.builtin.apt_repository:
repo: "deb-src [signed-by=/etc/apt/keyrings/gns3-ppa.asc] https://ppa.launchpadcontent.net/gns3/ppa/ubuntu {{ ansible_distribution_release }} main "
state: present
# apt_repository:
# repo: ppa:gns3/ppa
# state: present
# update_cache: True
# validate_certs: False
- name: Install gns3 server - name: Install gns3 server
ansible.builtin.apt: ansible.builtin.apt:
name: gns3-server name: gns3-server

View file

@ -1,11 +0,0 @@
[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

View file

@ -6,27 +6,7 @@
state: directory state: directory
- name: Download and unpack JetBrains IDEA - name: Download and unpack JetBrains IDEA
unarchive: unarchive:
src: https://data.services.jetbrains.com/products/download?code=IIU&platform=linux src: https://download.jetbrains.com/idea/ideaIC-2023.2.1.tar.gz
dest: /opt/IDEA dest: /opt/IDEA
extra_opts: --strip-components=1 creates: /opt/IDEA/idea-IC-232.9559.62/build.txt
creates: /opt/IDEA/build.txt
remote_src: yes 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

View file

@ -1,20 +1,10 @@
- name: Add Inkscape repository - name: Add Inkscape repository
block: apt_repository:
- name: add Inkscape trunk apt key repo: ppa:inkscape.dev/stable
ansible.builtin.get_url: state: present
url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1F46021FF9A0C56504CE42CD06E315A37AAEF27A update_cache: True
dest: /etc/apt/keyrings/inkscape-trunk-ppa.asc validate_certs: False
- name: add Inkscape trunk apt deb source
ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/inkscape-trunk-ppa.asc] https://ppa.launchpadcontent.net/reviczky/inkscape-1.4/ubuntu {{ ansible_distribution_release }} main "
state: present
# apt_repository:
# repo: ppa:inkscape.dev/stable
# state: present
# update_cache: True
# validate_certs: False
- name: Install Inkscape - name: Install Inkscape
apt: apt:
name: inkscape-trunk name: inkscape
state: latest state: latest

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install Icarus
apt:
name: iverilog
state: latest

View file

@ -1,5 +0,0 @@
- name: Install Icarus Verilog
win_chocolatey:
name: iverilog
version: '11.0'
state: present

View file

@ -1,11 +1,6 @@
- name: Install latest OpenJDK (25) - name: Install OpenJDK 21
apt: apt:
name: openjdk-25-jdk name: openjdk-21-jdk
state: latest
- name: Install latest Java docs
apt:
name: openjdk-25-doc
state: latest state: latest
- name: Install OpenJDK 17 - name: Install OpenJDK 17
@ -36,7 +31,11 @@
- libc6-x32 - libc6-x32
state: latest state: latest
- name: Install Oracle JDK 24 - name: Install Oracle JDK 22
apt: apt:
deb: "https://download.oracle.com/java/24/latest/jdk-24_linux-x64_bin.deb" deb: "https://download.oracle.com/java/22/latest/jdk-22_linux-x64_bin.deb"
- name: Install Java docs
apt:
deb: "https://download.oracle.com/java/22/latest/jdk-22_linux-x64_bin.deb"

View file

@ -1,6 +1,6 @@
- name: Install Oracle JDK - name: Install Oracle JDK
win_package: win_package:
path: https://download.oracle.com/java/24/latest/jdk-24_windows-x64_bin.msi path: https://download.oracle.com/java/22/latest/jdk-22_windows-x64_bin.msi
arguments: INSTALLLEVEL=3 arguments: INSTALLLEVEL=3
- name: Find Java version - name: Find Java version
@ -28,13 +28,6 @@
state: present state: present
scope: machine scope: machine
- name: Add Java bin dir to PATH
win_path:
name: PATH
elements: "{{ reg['raw_value'] }}\\bin"
state: present
scope: machine
- name: Disable Java updates - name: Disable Java updates
win_regedit: win_regedit:
path: HKLM:\SOFTWARE\WOW6432Node\JavaSoft\Java Update\Policy path: HKLM:\SOFTWARE\WOW6432Node\JavaSoft\Java Update\Policy

View file

@ -2,25 +2,15 @@
apt: apt:
name: jupyter name: jupyter
state: latest state: latest
- name: Install Jupyter Console - name: Install Jupyter Console
apt: apt:
name: jupyter-console name: jupyter-console
state: latest state: latest
- name: Install Jupyter QT Console - name: Install Jupyter QT Console
apt: apt:
name: jupyter-qtconsole name: jupyter-qtconsole
state: latest state: latest
- name: Install Jupyter Notebook - name: Install Jupyter Notebook
apt: apt:
name: jupyter-notebook name: jupyter-notebook
state: latest state: latest
- name: Install Jupyter Lab
apt:
name: jupyterlab
state: latest

View file

@ -11,13 +11,3 @@
dest: /opt/logisim dest: /opt/logisim
remote_src: yes remote_src: yes
creates: /opt/logisim/META-INF/MANIFEST.MF 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
dest: /opt/logisim-evolution
remote_src: yes
creates: /opt/logisim-evolution/META-INF/MANIFEST.MF

View file

@ -1,6 +1,6 @@
- name: Set Matlab version and destination - name: Set Matlab version and destination
set_fact: set_fact:
target_version: "R2025a_Update_1" target_version: "R2024a_Update_5"
install_dir: "/mnt/ucilnice_d/install/matlab/" install_dir: "/mnt/ucilnice_d/install/matlab/"
license_path: "/mnt/ucilnice_d/install/matlab/network.lic" license_path: "/mnt/ucilnice_d/install/matlab/network.lic"
dest_dir: /opt/matlab dest_dir: /opt/matlab
@ -23,7 +23,7 @@
- name: Install Matlab - name: Install Matlab
command: command:
cmd: /tmp/matlab_iso/install -inputFile "/tmp/matlab_installer_input.txt" cmd: /tmp/matlab_iso/install -inputFile "/tmp/matlab_installer_input.txt"
creates: "{{ dest_dir }}/licenses/license_info.xml" # creates: "{{ dest_dir }}/VersionInfo.xml"
#- name: Unmount Matlab ISO #- name: Unmount Matlab ISO
# win_disk_image: # win_disk_image:
# image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}_windows.iso" # image_path: "{{ installers }}\\matlab\\matlab-{{ target_version }}_windows.iso"

View file

@ -2,7 +2,7 @@
set_fact: set_fact:
target_version: "R2025a_Update_1" target_version: "R2025a_Update_1"
license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic license_path: \\ucilnicesmb.fri1.uni-lj.si\ucilnice_d\install\matlab\network.lic
dest_dir: "{{ large_prog_dir }}\\matlab" dest_dir: D:\matlab
- name: Set ISO path - name: Set ISO path
set_fact: set_fact:
@ -17,27 +17,21 @@
- name: Prepare installer_input.txt - name: Prepare installer_input.txt
template: template:
src: installer_input.txt src: installer_input.txt
dest: c:\matlab_installer_input.txt dest: d:\matlab_installer_input.txt
- name: Install Matlab - name: Install Matlab
win_package: win_package:
path: "{{ disk_image.mount_paths[0] }}\\setup.exe" path: "{{ disk_image.mount_paths[0] }}\\setup.exe"
arguments: -inputFile "c:\\matlab_installer_input.txt" arguments: -inputFile "d:\\matlab_installer_input.txt"
- name: Unmount Matlab ISO - name: Unmount Matlab ISO
win_disk_image: win_disk_image:
image_path: "{{ iso_path }}" image_path: "{{ iso_path }}"
state: absent state: absent
ignore_errors: true
- name: Create licenses directory # TODO MATLAB throws license error -83 when run
win_file: - name: Install Matlab license
dest: "{{ dest_dir }}\\licenses" win_copy:
state: directory dest: "{{ dest_dir }}\\licenses\\network.lic"
src: "{{ installers }}\\matlab\\network.lic"
# MATLAB will no longer be used with concurrent licenses - let them license their own! remote_src: yes
#- name: Install Matlab license
# win_copy:
# dest: "{{ dest_dir }}\\licenses\\network.lic"
# src: "{{ installers }}\\matlab\\network.lic"
# remote_src: yes

View file

@ -13,8 +13,7 @@ agreeToLicense=yes
## Users must log in to their MathWorks Account when MATLAB starts. ## Users must log in to their MathWorks Account when MATLAB starts.
## ##
## NOTE: This flag is valid in silent installations only. ## NOTE: This flag is valid in silent installations only.
# enableLNU=no enableLNU=no
enableLNU=yes
improveMATLAB=no improveMATLAB=no

View file

@ -1,11 +1,4 @@
- name: Install matplotlib - name: Install maptplotlib
apt: apt:
name: name: matplotlib
- python3-matplotlib
- python3-matplotlib-inline
- python3-matplotlib-venn
- python3-mpl-animators
- python3-mpl-scatter-density
- python3-mplcursors
- python3-mplexporter
state: latest state: latest

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install mlxtend
pip:
executable: pipx
name: mlxtend

View file

@ -1,2 +0,0 @@
- name: Install pandas
win_command: pip install mlxtend

View file

@ -1,104 +1,8 @@
- name: Create mysql workbench build directory - name: Download mysql workbench
file:
path: /tmp/mysql-workbench
state: directory
- name: Download mysql workbench source
get_url: get_url:
url: https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-8.0.43-src.tar.gz url: https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
dest: /tmp/mysql-workbench/mysql-workbench.tgz dest: /tmp/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
http_agent: "Wget/1.21.3" http_agent: "Wget/1.21.3"
register: mysql_download - name: Install mysql workbench
- name: Install mysql workbench build dependencies
apt: apt:
package: deb: /tmp/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
- build-essential
- cmake
- cmake-data
- autoconf
- automake
- pkg-config
- libtool
- libzip-dev
- libxml2-dev
- libsigc++-2.0-dev
- libglade2-dev
- libglu1-mesa-dev
- libgl1-mesa-dev
- mesa-common-dev
- libmysqlclient-dev
- libmysqlcppconn-dev
- uuid-dev
- libpixman-1-dev
- libpcre3-dev
- libpango1.0-dev
- libcairo2-dev
- python3-dev
- libboost-dev
- default-mysql-client
- libsqlite3-dev
- swig4.1
- libvsqlitepp-dev
- libgdal-dev
- libgtk-3-dev
- libgtkmm-3.0-dev
- libssl-dev
- libsecret-1-dev
- libproj-dev
- libssh-dev
- rapidjson-dev
- unixodbc-dev
- unixodbc
- name: Create /usr/local/share/java
file:
path: /usr/local/share/java
state: directory
- name: Download antlr jar
get_url:
url: https://www.antlr.org/download/antlr-4.13.2-complete.jar
dest: /usr/local/share/java/antlr-4.13.2-complete.jar
- name: Create antlr4 build dir
file:
path: /tmp/antlr4/build
state: directory
- name: Checkout antlr4 (cpp runtime)
git:
repo: https://github.com/antlr/antlr4/
dest: /tmp/antlr4/antlr4
- name: Build antlr4 cpp runtime
shell:
cmd: "cd /tmp/antlr4/build; cmake ../antlr4/runtime/Cpp; make; make install"
- name: Extract MySQL Workbench source
unarchive:
src: "{{ mysql_download.dest }}"
remote_src: true
dest: /tmp/mysql-workbench
- name: Create build dir
file:
path: /tmp/mysql-workbench/build
state: directory
- name: Build Mysql Workbench
shell:
cmd: "cd /tmp/mysql-workbench/build; cmake -DUSE_UNIXODBC=True -DODBC_LIBRARIES=-lodbc -DANTLR_JAR_PATH=/usr/local/share/java -DSWIG_EXECUTABLE=/usr/bin/swig4.1 -DSWIG_DIR=/usr/share/swig4.1 ../mysql-workbench-*-src; make; make install"
#- name: Download mysql workbench
# get_url:
# url: https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
# dest: /tmp/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
# http_agent: "Wget/1.21.3"
#- name: Install mysql workbench
# apt:
# deb: /tmp/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb

View file

@ -2,22 +2,8 @@
set_fact: set_fact:
target_version: "26" target_version: "26"
#- name: Install Netbeans from Chocolatey
# win_chocolatey:
# name: NetBeans
# state: upgrade
# https://downloads.apache.org/netbeans/netbeans/26/netbeans-26-bin.zip
- name: Download Netbeans
win_get_url:
url: "https://github.com/Friends-of-Apache-NetBeans/netbeans-installers/releases/download/v{{ target_version }}-build1/Apache-NetBeans-{{ target_version }}.exe"
dest: "c:\\Apache-NetBeans-{{ target_version }}.exe"
- name: Install Netbeans - name: Install Netbeans
win_package: win_package:
path: "c:\\Apache-NetBeans-{{ target_version }}.exe" path: "https://dlcdn.apache.org/netbeans/netbeans-installers/{{ target_version }}/Apache-NetBeans-{{ target_version }}-bin-windows-x64.exe"
# path: "https://github.com/Friends-of-Apache-NetBeans/netbeans-installers/releases/download/v{{ target_version }}-build1/Apache-NetBeans-{{ target_version }}.exe" arguments: --silent
# path: "https://dlcdn.apache.org/netbeans/netbeans-installers/{{ target_version }}/Apache-NetBeans-{{ target_version }}-bin-windows-x64.exe" creates_path: "%ProgramFiles%\\NetBeans-{{ target_version }}\\netbeans\\bin\\netbeans.exe"
arguments: "\"/DIR={{ ansible_env['ProgramFiles'] }}\\NetBeans-{{ target_version }}\" /SUPPRESSMSGBOXES /VERYSILENT /SP-"
creates_path: "%ProgramFiles%\\NetBeans-{{ target_version }}\\bin\\netbeans.exe"

View file

@ -1,4 +0,0 @@
- import_tasks: main_win.yml
when: ansible_os_family == 'Windows'
- import_tasks: main_lin.yml
when: ansible_os_family == 'Debian'

View file

@ -1,4 +0,0 @@
- name: Install networkx
apt:
name: python3-networkx
state: latest

View file

@ -1,2 +0,0 @@
- name: Install networkx
win_command: pip install networkx

View file

@ -1,7 +1,7 @@
- name: Add NodeJS repo key - name: Add NodeJS repo key
get_url: apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
dest: /etc/apt/keyrings/nodesource.asc keyring: /etc/apt/keyrings/nodesource.gpg
#- name: Add NodeJS repo url #- name: Add NodeJS repo url
# apt_repository: # apt_repository:
@ -9,5 +9,10 @@
- name: Add NodeJS LTS repo url - name: Add NodeJS LTS repo url
apt_repository: apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/nodesource.asc] https://deb.nodesource.com/node_22.x nodistro main" repo: "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main"
- name: Install NodeJS
apt:
name: nodejs
state: latest

View file

@ -2,7 +2,6 @@
win_chocolatey: win_chocolatey:
name: nodejs name: nodejs
# Install fails if multiple versions are installed - name: Install NodeJS-LTS
# - name: Install NodeJS-LTS win_chocolatey:
# win_chocolatey: name: nodejs-lts
# name: nodejs-lts

View file

@ -1,11 +0,0 @@
[Desktop Entry]
Name=Notepad++
GenericName=Notepad++
Comment=A simple IDE
Exec=wine "/opt/notepad++/notepad++.exe"
Icon=notepad++
Terminal=false
Type=Application
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++;
Categories=Education;Development;ComputerScience;
StartupNotify=true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View file

@ -19,24 +19,6 @@
- name: Download and unpack Notepad++ - name: Download and unpack Notepad++
unarchive: unarchive:
src: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.8.5/npp.8.8.5.portable.x64.zip src: https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.5.7/npp.8.5.7.portable.x64.zip
dest: /opt/notepad++ dest: /opt/notepad++
remote_src: yes remote_src: yes
- name: Install icon
block:
- file:
path: /usr/local/share/icons
state: directory
- copy:
src: notepad++.png
dest: /usr/local/share/icons/notepad++.png
- name: Create .desktop file
block:
- file:
path: /usr/local/share/applications
state: directory
- copy:
dest: /usr/local/share/applications/notepad++.desktop
src: notepad++.desktop

Some files were not shown because too many files have changed in this diff Show more