Erstellung des Git-Repos

This commit is contained in:
PAN
2025-07-25 00:13:17 +02:00
commit add0e7c75b
3 changed files with 164 additions and 0 deletions

2
inventory.ini Normal file
View File

@@ -0,0 +1,2 @@
[MeinePC]
MeinTest

136
main.yml Normal file
View File

@@ -0,0 +1,136 @@
---
- name: Linux Installaton Meines PCs
remote_user: ansi
hosts: MeinTest
become: true
vars_files:
- ./vars/user_config.yaml
- ./vars/Programm_liste.yaml
tasks:
- name: Erreichbarkeit des Ziels Prüfen
ansible.builtin.ping:
data: Pong
- name: Erstellung Meines benutzers
tags: User
ansible.builtin.user:
append: true
create_home: true
name: "{{ user_name }}"
shell: "{{ user_shell }}"
groups: "{{ user_groups }}"
password: "{{ user_password | password_hash('sha256') }}"
update_password: always
- name: Install Grundpackete
tags: Test
block:
- name: Install RPM Packete
ansible.builtin.dnf:
name: "{{ item }}"
state: present
disable_gpg_check: true
loop:
- "{{ rpm_packete }}"
- name: Update cach fü DNF
ansible.builtin.dnf5:
update_cache: true
- name: Install DNF Packete
ansible.builtin.dnf:
autoremove: true
name: "{{ item }}"
use_backend: dnf5
skip_broken: true
loop:
- "{{ dnf_Packete }}"
- name: Install flathub
become_user: "{{ user_name }}"
become: true
community.general.flatpak_remote:
name: flathub
state: present
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
method: user
- name: Install Obsidan
become_user: "{{ user_name }}"
become: true
community.general.flatpak:
executable: flatpak
method: user
name: "{{ item }}"
remote: flathub
state: present
loop: "{{ flatpaks }}"
- name: Wechsel auf SDDM
ansible.builtin.systemd_service:
enabled: true
force: true
name: sddm.service
state: started
- name: Terminal dinge installieren
block:
- name: Aktiviere Zellij Corp
community.general.copr:
host: copr.fedorainfracloud.org
state: enabled
name: varlad/zellij
- name: Installieren von Zellij
ansible.builtin.dnf:
name: Zellij
state: present
- name: Download Oh-My-Posh
ansible.builtin.get_url:
url: https://ohmyposh.dev/install.sh
dest: /tmp/
owner: "{{ user_name }}"
group: "{{ user_name }}"
tags: omp
- name: Install Oh-My-Posh
ansible.builtin.shell:
cmd: su - pan -c /tmp/install.sh
tags: omp
- name: Ordner für Font installer erstellen
ansible.builtin.file:
state: directory
path: /tmp/font/
mode: u=rwx,g=rw,o=rw
owner: "{{ user_name }}"
group: "{{ user_name }}"
tags: omp
- name: Download der font
ansible.builtin.get_url:
url: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraCode.zip
dest: /tmp/font/FiraCode.zip
mode: ug+rwx
owner: "{{ user_name }}"
group: "{{ user_name }}"
tags: omp
- name: Install Fire Nerd Font
ansible.builtin.unarchive:
src: /tmp/font/FiraCode.zip
dest: /usr/share/fonts/nerd-fonts
- name: Erstellung des Konfiordners für Alacritty
ansible.builtin.file:
path: /home/"{{ user_name }}"/.config/"{{ item }}"
state: directory
owner: "{{ user_name }}"
group: "{{ user_name }}"
mode: "{{ user_mode }}"
loop:
- .config/alacritty
- themes

26
vars/Programm_liste.yaml Normal file
View File

@@ -0,0 +1,26 @@
fedora_ver: "{{ansible_distribution_major_version}}"
rpm_packete:
- https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ fedora_ver }}.noarch.rpm
- https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ fedora_ver }}.noarch.rpm
- https://github.com/VSCodium/vscodium/releases/download/1.102.14746/codium-1.102.14746-el8.x86_64.rpm
- https://github.com/rustdesk/rustdesk/releases/download/1.4.0/rustdesk-1.4.0-0.x86_64.rpm
dnf_Packete:
- dino
- thunderbird
- firefox
- vim
- vlc
- alacritty
- fastfetch
- git
- unzip
- libreoffice
- steam
- "@kde-desktop"
flatpaks:
- md.obsidian.Obsidian
- com.bitwarden.desktop
- com.usebottles.bottles
- com.github.tchx84. Flatseal