commit 43a457a2ed0c00ab94bd6d60c208f4fe3af20197 Author: Timotej Lazar Date: Wed Sep 14 13:33:06 2022 +0000 First commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..20e223c --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Ansible playbooks for deploying classroom computers. Run with something like: + + ansible-playbook --user --ask-pass \ + --become --become-method=runas --become-user= + --inventory hosts setup.yml diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..765b9ec --- /dev/null +++ b/TODO.md @@ -0,0 +1,108 @@ +# Done + +- 7-zip +- Audacity +- Blender +- Chrome +- Emacs +- Gimp +- GIT +- GIT-Extensions +- Inkscape +- Mozilla Firefox +- Notepad++ +- OpenJDK +- Orange +- Pelles C for Windows +- Python (latest) +- SWI-Prolog +- Thonny +- VirtualBox +- Wireshark + +# To do + +- Haskell +- GNS3 +- IntelliJ IDEA Community Edition +- JetBrains PyCharm Community Edition +- Android Studio +- Logisim +- Unity 2019.1.10f1 +- MeshLab +- Mathlab +- Adobe Acrobat Reader +- Eclipse IDE for Java +- WinHIPsim +- APS2-Vaje +- Windows Subsystem for Linux (Ubuntu) +- Gcc +- G++ +- Xcode +- Julia +- Jupyter notebook/lab +- Python knjižnice numpy, matplotlib in scipy, sqlite3 in pyodbc +- WinIdea +- gcc-arm +- VisUAL +- IntelliJ IDEA Ultimate +- Docker Toolbox (Docker for Windows uporablja HyperV virtualizacijo, ta pa zaklene VT-x samo za sebe ne glede na to ali je pognan ali ne) +- Apache Maven +- CUDA Toolkit 8.0 (na HP-jih) +- Asistentov Asisten +- FFmpeg (Windows) for Audacity +- LAME +- Heidi SQL +- IAR Embedded Workbench for ARM +- LTspice IV +- Microsoft Visual Studio Code +- RStudio +- SafeExamBrowser +- Scala Programming Language Distribution +- VMware Workstation +- XAMPP +- Xilinx Desing Tools ISE WebPACK +- Weka +- TortoiseSVN +- Tableau +- Sybase PowerDesigner +- SoapUI +- Scilab +- Racket +- Standard ML of New Jersey +- R for Windows +- PyQt for Python +- Oracle VM VirtualBox +- Octave +- NetBeans IDE +- MySQL Workbench CE +- Microsoft Web Deploy +- Microsoft Visual Studio Enterprise 2017 (Lahko Community) +- Microsoft Visual Studio Enterprise 2015 (Na HP-jih) +- Naložiti modul za C++ +- Node.js LTS +- SolidWorks +- Gnuplot +- Gv +- Imagemagick +- OpenModelica +- Postman +- Python knjižnice Biopython, skfusion, networkx, pandas, scikit-learn +- OCaml +- Podatkovne baze na WAFL +- Mendeley for Desktop +- Mendeley Web Importer for Chrome +- Omnetpp +- Arduino IDE + esp 8266 +- QUcs +- Office 2016 +- StarEEvaluation software-FKKT +- AutoCAD-FKKT +- PathFinder 2018-FKKT +- Processing v 3.3.7 +- Microsoft project Professional 2016 +- Autodesk Maya +- JRE 8u181 in JRE 8u181 (x64) in JDK 10.2 + +# nonfree +- Sublime Text diff --git a/group_vars/classroom/vars.yml b/group_vars/classroom/vars.yml new file mode 100644 index 0000000..c3ba79f --- /dev/null +++ b/group_vars/classroom/vars.yml @@ -0,0 +1,5 @@ +ansible_connection: winrm +ansible_winrm_transport: ntlm +ansible_winrm_server_cert_validation: ignore +ansible_port: 5985 +logon_type: interactive diff --git a/hosts b/hosts new file mode 100644 index 0000000..a55e9c4 --- /dev/null +++ b/hosts @@ -0,0 +1,6 @@ +all: + children: + classroom: + hosts: + prototip: + ansible_host: 10.32.231.3 diff --git a/roles/classroom/tasks/7zip.yml b/roles/classroom/tasks/7zip.yml new file mode 100644 index 0000000..4c9241d --- /dev/null +++ b/roles/classroom/tasks/7zip.yml @@ -0,0 +1,3 @@ +- name: Install 7-zip + win_chocolatey: + name: 7zip diff --git a/roles/classroom/tasks/audacity.yml b/roles/classroom/tasks/audacity.yml new file mode 100644 index 0000000..bd11fd6 --- /dev/null +++ b/roles/classroom/tasks/audacity.yml @@ -0,0 +1,3 @@ +- name: Install Audacity + win_chocolatey: + name: audacity diff --git a/roles/classroom/tasks/blender.yml b/roles/classroom/tasks/blender.yml new file mode 100644 index 0000000..8985fd2 --- /dev/null +++ b/roles/classroom/tasks/blender.yml @@ -0,0 +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 diff --git a/roles/classroom/tasks/chrome.yml b/roles/classroom/tasks/chrome.yml new file mode 100644 index 0000000..221c6ce --- /dev/null +++ b/roles/classroom/tasks/chrome.yml @@ -0,0 +1,10 @@ +- name: Install Chrome + win_chocolatey: + name: googlechrome + +- name: Disable Chrome updates + win_regedit: + path: HKLM:\SOFTWARE\Policies\Google\Update + name: AutoUpdateCheckPeriodMinutes + type: dword + data: 0 diff --git a/roles/classroom/tasks/emacs.yml b/roles/classroom/tasks/emacs.yml new file mode 100644 index 0000000..6d177a0 --- /dev/null +++ b/roles/classroom/tasks/emacs.yml @@ -0,0 +1,4 @@ +- name: Install Emacs + win_chocolatey: + name: emacs.install + state: present diff --git a/roles/classroom/tasks/firefox.yml b/roles/classroom/tasks/firefox.yml new file mode 100644 index 0000000..53987a9 --- /dev/null +++ b/roles/classroom/tasks/firefox.yml @@ -0,0 +1,26 @@ +- name: Install Firefox + win_chocolatey: + name: firefox +- name: Create Firefox policy directory + win_file: + dest: C:\Program Files\Mozilla Firefox\distribution + state: directory +- 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 + } + } + } diff --git a/roles/classroom/tasks/gimp.yml b/roles/classroom/tasks/gimp.yml new file mode 100644 index 0000000..fa361a0 --- /dev/null +++ b/roles/classroom/tasks/gimp.yml @@ -0,0 +1,3 @@ +- name: Install GIMP + win_chocolatey: + name: gimp diff --git a/roles/classroom/tasks/git.yml b/roles/classroom/tasks/git.yml new file mode 100644 index 0000000..b08c7c9 --- /dev/null +++ b/roles/classroom/tasks/git.yml @@ -0,0 +1,8 @@ +- name: Install git + win_chocolatey: + name: git.install + package_params: /GitAndUnixToolsOnPath + +- name: Install git-extensions + win_chocolatey: + name: gitextensions, kdiff3 diff --git a/roles/classroom/tasks/inkscape.yml b/roles/classroom/tasks/inkscape.yml new file mode 100644 index 0000000..d8621f6 --- /dev/null +++ b/roles/classroom/tasks/inkscape.yml @@ -0,0 +1,3 @@ +- name: Install Inkscape + win_chocolatey: + name: inkscape diff --git a/roles/classroom/tasks/main.yml b/roles/classroom/tasks/main.yml new file mode 100644 index 0000000..a48f372 --- /dev/null +++ b/roles/classroom/tasks/main.yml @@ -0,0 +1,19 @@ +- import_tasks: 7zip.yml +- import_tasks: audacity.yml +- import_tasks: blender.yml +- import_tasks: chrome.yml +- import_tasks: emacs.yml +- import_tasks: inkscape.yml +- import_tasks: firefox.yml +- import_tasks: gimp.yml +- import_tasks: git.yml +- import_tasks: notepad++.yml +- import_tasks: openjdk.yml +- import_tasks: orange.yml +- import_tasks: pelles-c.yml +- import_tasks: processing.yml +- import_tasks: python.yml +- import_tasks: swi-prolog.yml +- import_tasks: thonny.yml +- import_tasks: virtualbox.yml +- import_tasks: wireshark.yml diff --git a/roles/classroom/tasks/notepad++.yml b/roles/classroom/tasks/notepad++.yml new file mode 100644 index 0000000..ac1378d --- /dev/null +++ b/roles/classroom/tasks/notepad++.yml @@ -0,0 +1,4 @@ +# TODO disable update check +- name: Install Notepad++ + win_chocolatey: + name: notepadplusplus diff --git a/roles/classroom/tasks/openjdk.yml b/roles/classroom/tasks/openjdk.yml new file mode 100644 index 0000000..ffc6a05 --- /dev/null +++ b/roles/classroom/tasks/openjdk.yml @@ -0,0 +1,3 @@ +- name: Install OpenJDK + win_chocolatey: + name: openjdk diff --git a/roles/classroom/tasks/orange.yml b/roles/classroom/tasks/orange.yml new file mode 100644 index 0000000..7da92bf --- /dev/null +++ b/roles/classroom/tasks/orange.yml @@ -0,0 +1,7 @@ +- name: Install Orange + win_package: + path: https://download.biolab.si/download/files/Orange3-3.32.0-Miniconda-x86_64.exe + arguments: /S /AllUsers + creates_path: C:\Program Files\Orange\python.exe + creates_version: 3.8.8150.1013 + diff --git a/roles/classroom/tasks/pelles-c.yml b/roles/classroom/tasks/pelles-c.yml new file mode 100644 index 0000000..15cb253 --- /dev/null +++ b/roles/classroom/tasks/pelles-c.yml @@ -0,0 +1,31 @@ +# TODO switch to chocolatey once they fix the installer and upgrade to 11 +- name: Set PellesC version + set_fact: + target_version: "11.00" + target_checksum: "a8ae79f0e340e4c0cec0869dd72fcd875496acc470174aed8eb377eab8bbce96" + +- name: Check PellesC install status + win_stat: + path: C:\Program Files\PellesC\Bin\poide.exe + register: file + +- when: not file.stat.exists + block: + # win_package fails to download for some reason + - name: Download PellesC + win_get_url: + url: http://www.smorgasbordet.com/pellesc/{{ target_version | replace('.', '') }}/setup.exe + checksum_algorithm: sha256 + checksum: "{{ target_checksum }}" + dest: 'C:\' + register: download + + - name: Install PellesC + win_package: + path: "{{ download.dest }}" + arguments: /S + + - name: Remove temporary files + win_file: + path: "{{ download.dest }}" + state: absent diff --git a/roles/classroom/tasks/processing.yml b/roles/classroom/tasks/processing.yml new file mode 100644 index 0000000..597d97e --- /dev/null +++ b/roles/classroom/tasks/processing.yml @@ -0,0 +1,47 @@ +- name: Set Processing version + set_fact: + target_version: 4.0.1 + target_build: 1286 + +- name: Check Processing install status + win_stat: + path: C:\Program Files\Processing\lib\version.txt + register: file + +- name: Check Processing version + slurp: + src: C:\Program Files\Processing\lib\version.txt + register: version + when: file.stat.exists + +- when: not file.stat.exists or ((version.content | b64decode) != target_version) + block: + - name: Make Processing directory + win_file: + path: C:\Program Files\Processing + state: directory + - name: Download Processing + win_get_url: + dest: 'C:\Program Files\Processing\processing.zip' + url: https://github.com/processing/processing4/releases/download/processing-{{ target_build }}-{{ target_version }}/processing-{{ target_version }}-windows-x64.zip + - name: Unzip Processing + win_unzip: + dest: 'C:\Program Files\Processing' + src: 'C:\Program Files\Processing\processing.zip' + - name: Install Processing + win_copy: + dest: C:\Program Files\Processing\ + src: 'C:\Program Files\Processing\processing-{{ target_version }}\' + remote_src: yes + - name: Disable telemetry + win_lineinfile: + path: C:\Program Files\Processing\lib\defaults.txt + regexp: 'update.check' + line: 'update.check = false' + - name: Remove temporary files + win_file: + path: C:\Program Files\Processing\{{ item }} + state: absent + loop: + - processing.zip + - processing-{{ target_version }} diff --git a/roles/classroom/tasks/python.yml b/roles/classroom/tasks/python.yml new file mode 100644 index 0000000..60a44b2 --- /dev/null +++ b/roles/classroom/tasks/python.yml @@ -0,0 +1,3 @@ +- name: Install Python + win_chocolatey: + name: python diff --git a/roles/classroom/tasks/swi-prolog.yml b/roles/classroom/tasks/swi-prolog.yml new file mode 100644 index 0000000..d7fbd07 --- /dev/null +++ b/roles/classroom/tasks/swi-prolog.yml @@ -0,0 +1,3 @@ +- name: Install SWI-Prolog + win_chocolatey: + name: swi-prolog diff --git a/roles/classroom/tasks/thonny.yml b/roles/classroom/tasks/thonny.yml new file mode 100644 index 0000000..92c2686 --- /dev/null +++ b/roles/classroom/tasks/thonny.yml @@ -0,0 +1,28 @@ +# TODO switch to chocolatey once they upgrade to Thonny≥4 +- name: Set Thonny version + set_fact: + target_version: 4.0.1 + +- name: Check Thonny install status + win_stat: + path: C:\Program Files (x86)\Thonny\thonny.exe + register: file + +- when: not file.stat.exists + block: + # win_package fails to download for some reason + - name: Download Thonny + win_get_url: + url: https://github.com/thonny/thonny/releases/download/v{{ target_version }}/thonny-{{ target_version }}.exe + dest: 'C:\' + register: download + + - name: Install Thonny + win_package: + path: "{{ download.dest }}" + arguments: /Verysilent /AllUsers + + - name: Remove temporary files + win_file: + path: "{{ download.dest }}" + state: absent diff --git a/roles/classroom/tasks/virtualbox.yml b/roles/classroom/tasks/virtualbox.yml new file mode 100644 index 0000000..3c2fd69 --- /dev/null +++ b/roles/classroom/tasks/virtualbox.yml @@ -0,0 +1,4 @@ +- name: Install Virtualbox + win_chocolatey: + name: virtualbox + state: present diff --git a/roles/classroom/tasks/wireshark.yml b/roles/classroom/tasks/wireshark.yml new file mode 100644 index 0000000..e2ed3b4 --- /dev/null +++ b/roles/classroom/tasks/wireshark.yml @@ -0,0 +1,9 @@ +# npcap=0.96 is the last version to support silent installation +- name: Install npcap + win_package: + path: https://npcap.com/dist/npcap-0.96.exe + arguments: /S + +- name: Install Wireshark + win_chocolatey: + name: wireshark diff --git a/setup.yml b/setup.yml new file mode 100644 index 0000000..844d1fd --- /dev/null +++ b/setup.yml @@ -0,0 +1,3 @@ +- hosts: classroom + roles: + - classroom