commit 68ca27148821de49ca5006e1cde835e8cb586d40 Author: Emil Miler Date: Wed Aug 31 12:02:29 2022 +0200 Add local files diff --git a/bakalari.yaml b/bakalari.yaml new file mode 100644 index 0000000..e545087 --- /dev/null +++ b/bakalari.yaml @@ -0,0 +1,10 @@ +- name: Install Bakaláři + hosts: ucitelske + user: administrator + become: true + tasks: + - name: Create desktop shortcut for Bakaláři + copy: src={{ item.src }} dest={{ item.desc }} + with_items: + - { src: 'files/bakalari.desktop', dest: '/usr/share/applications/bakalari.desktop' } + - { src: 'files/bakalari.png', dest: '/usr/share/icons/bakalari.png' } diff --git a/files/bakalari.desktop b/files/bakalari.desktop new file mode 100644 index 0000000..fd64842 --- /dev/null +++ b/files/bakalari.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Bakaláři +Exec=/usr/bin/firefox https://dochazka.gjk.cz/login +StartupNotify=true +Terminal=false +Type=Application +Categories=Utility; +Icon=/usr/share/icons/bakalari.png diff --git a/files/bakalari.png b/files/bakalari.png new file mode 100644 index 0000000..aae09cc Binary files /dev/null and b/files/bakalari.png differ diff --git a/gdm/00-login-screen b/gdm/00-login-screen new file mode 100644 index 0000000..ea23eb1 --- /dev/null +++ b/gdm/00-login-screen @@ -0,0 +1,3 @@ +[org/gnome/login-screen] +# Do not show the user list +disable-user-list=true diff --git a/gdm/07-accessibility b/gdm/07-accessibility new file mode 100644 index 0000000..f3498d1 --- /dev/null +++ b/gdm/07-accessibility @@ -0,0 +1,2 @@ +[org/gnome/desktop/interface] +toolkit-accessibility=false diff --git a/gdm/profile b/gdm/profile new file mode 100644 index 0000000..817afc5 --- /dev/null +++ b/gdm/profile @@ -0,0 +1,3 @@ +user-db:user +system-db:gdm +file-db:/usr/share/gdm/greeter-dconf-defaults diff --git a/hosts b/hosts new file mode 100644 index 0000000..2fb6f8f --- /dev/null +++ b/hosts @@ -0,0 +1,41 @@ +[PoV] +VU00.local +VU01.local +VU02.local +VU03.local +VU04.local +VU05.local +VU06.local +VU07.local +VU08.local +VU09.local +VU10.local +VU11.local +VU12.local +VU13.local +VU14.local +VU15.local + +[PoM] +MU01.local +MU02.local +MU03.local +MU04.local +MU05.local +MU06.local +MU07.local +MU08.local +MU09.local +MU10.local +MU11.local +MU12.local +MU13.local +MU14.local +MU15.local +MU16.local +MU17.local +MU18.local + +[ucitelske] +VU00.local +MU01.local diff --git a/repositories/vscode b/repositories/vscode new file mode 100644 index 0000000..5e9f01c --- /dev/null +++ b/repositories/vscode @@ -0,0 +1,9 @@ +[vscode] +name=packages.microsoft.com +baseurl=https://packages.microsoft.com/yumrepos/vscode/ +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://packages.microsoft.com/keys/microsoft.asc +metadata_expire=1h + diff --git a/setup.yaml b/setup.yaml new file mode 100644 index 0000000..9a68716 --- /dev/null +++ b/setup.yaml @@ -0,0 +1,84 @@ +- name: GJK Fedora setting up script + hosts: all + user: administrator + become: true + tasks: + - name: Importing RPM Fusion (free) key + ansible.builtin.rpm_key: + state: present + key: https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020 + - name: Importing RPM Fusion (non-free) key + ansible.builtin.rpm_key: + state: present + key: https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020 + - name: Importing Microsoft VS Code key + ansible.builtin.rpm_key: + state: present + key: https://packages.microsoft.com/keys/microsoft.asc + - name: Activate RPM Fusion repository + dnf: + name: + - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ansible_distribution_major_version}}.noarch.rpm + - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ansible_distribution_major_version}}.noarch.rpm + state: present + - name: Activate VS Code repository + copy: + src: repositories/vscode + dest: /etc/yum.repos.d/vscode.repo + - name: Update system + dnf: + name: "*" + state: latest + - name: Boot Windows by default (PoV) + when: inventory_hostname in groups['PoV'] + command: "grub2-set-default \"Windows 8 (on /dev/sda1)\"" + - name: Boot Windows by default (PoM) + when: inventory_hostname in groups['PoM'] + command: "grub2-set-default \"Windows Boot Manager (on /dev/nvme0n1p1)\"" + - name: Add Czech keyboard layout + command: "localectl set-x11-keymap us,cz" + - name: Install NVIDIA drivers + when: inventory_hostname in groups['PoV'] + dnf: + name: + - akmod-nvidia + state: present + - name: Add flathub repo + command: "flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo" + - name: Enable flathub repo + command: "flatpak remote-modify --enable flathub" + - name: GDM usernames profile + copy: + src: 'gdm/profile' + dest: '/etc/dconf/profile/gdm' + - name: GDM login screen configuration - don't show all users + copy: + src: 'gdm/00-login-screen' + dest: '/etc/dconf/db/gdm.d/00-login-screen' + - name: GDM login screen configuration - disable accessibility #nefunguje, asi rozbitý GDM + copy: + src: 'gdm/07-accessibility' + dest: '/etc/dconf/db/gdm.d/07-accessibility' + - name: Update dconf database + command: "dconf update" + - name: Create Administrator user + user: + name: administrator + password: "$6$7BN9WWJY2XJuixhs$tirH/J9WV8HX9tf9J7DVFEdYSt0UA6N2TGu0Exih0fIAYHA/RDJPpTgGbYtxw6You4THNpYoFNiRO.HVESkRd0" + # generovat heslo pomocí `mkpasswd --method=sha-512` + groups: + - wheel + - dialout + state: present + #- name: Update student user + # user: + # name: student + # groups: + # - wheel + # - dialout + # state: present + # - name: Remove student user + # user: + # name: student + # state: absent + # remove: true diff --git a/software.yaml b/software.yaml new file mode 100644 index 0000000..ca0b17e --- /dev/null +++ b/software.yaml @@ -0,0 +1,55 @@ +- name: GJK Fedora software setup + hosts: all + user: administrator + become: true + + tasks: + - name: Install applications + dnf: + name: + - audacity + - code + - freecad + - gcc-c++ + - valgrind + - gimp + - htop + - inkscape + - kdenlive + - shotcut + - kicad + - krita + - mypaint + - prusa-slicer + - python3-idle + - texstudio + - screen + - tmux + - vim + # Multimedia codecs + - ffmpeg-libs + # Domain join requirements + - sssd + - oddjob + - oddjob-mkhomedir + - adcli + - samba-common-tools + # Games + #- openarena + state: present + + - name: Remove unused applications + dnf: + name: + - openarena + state: absent + + - name: Dependency cleanup + dnf: + autoremove: yes + + - name: Install required apps from flatpak + community.general.flatpak: + name: + - cc.arduino.arduinoide + state: present diff --git a/student.yaml b/student.yaml new file mode 100644 index 0000000..7ad7580 --- /dev/null +++ b/student.yaml @@ -0,0 +1,12 @@ +- name: GJK Fedora setting up script + hosts: all + user: administrator + become: true + tasks: + - name: Update student user + user: + name: student + password: $6$7Z.h8Q6CO9AevdIp$8W2nuvD7ZqeXBO.Azsayx2tJ4L0KD44hOz5aNzpGPN/hUtaROvmY7aJ0x7Ie3CPawp6lV4ln2fHQQ7V5Yuy7k0 + groups: + - dialout + state: present diff --git a/update.yaml b/update.yaml new file mode 100644 index 0000000..13b8850 --- /dev/null +++ b/update.yaml @@ -0,0 +1,15 @@ +- name: GJK Fedora update script + hosts: all + user: administrator + become: true + tasks: + - name: Update system + dnf: + name: "*" + state: latest + - name: Boot Windows by default (PoV) + when: inventory_hostname in groups['PoV'] + command: "grub2-set-default \"Windows 8 (on /dev/sda1)\"" + - name: Boot Windows by default (PoM) + when: inventory_hostname in groups['PoM'] + command: "grub2-set-default \"Windows Boot Manager (on /dev/nvme0n1p1)\""