You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.6 KiB
YAML
71 lines
2.6 KiB
YAML
2 years ago
|
- 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: 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
|