Add .dotfiles automated configuration

This commit is contained in:
Samuel Ortion 2023-03-25 21:52:21 +01:00
commit e2151d4cdd
8 changed files with 250 additions and 0 deletions

19
README.md Normal file
View File

@ -0,0 +1,19 @@
# My Fedora Ansible Post Install
## Quick Setup
1. Install `ansible`
```{bash}
sudo dnf install ansible
```
2. Run the playbooks
```{bash}
ansible-playbook <playbook.yaml>
```
## References
Some playbooks forked from <https://github.com/jpjubenot/ansible-post-install-my-fedora> CC By Jacques-Philippe JUBENOT.

7
ansible.cfg Normal file
View File

@ -0,0 +1,7 @@
[defaults]
inventory = ./hosts
retry_files_enabled = False
command_warnings=False
deprecation_warnings=False
host_key_checking = False
private_key_file = ~/.ssh/id_ecdsa

1
hosts Normal file
View File

@ -0,0 +1 @@
localhost ansible_connection=local

7
myfedora.yml Normal file
View File

@ -0,0 +1,7 @@
---
- hosts: localhost
remote_user: root
roles:
- bootstrap
- softwares
- config

0
myvars.yml Normal file
View File

View File

@ -0,0 +1,85 @@
---
#
# Copyright (c) 2017 Jacques-Philippe JUBENOT
# Licensed under CC BY 3.0. All rights reserved.
#
# Role Default
# Add Repository RPM Fusion FREE
- name: Verify if RPM Fusion FREE Repository exist
stat: path=/etc/yum.repos.d/rpmfusion-free.repo
register: fusionfrepo
tags:
- repofusion
- basicinst
- name: Add Repository RPM Fusion FREE
ansible.builtin.dnf:
name: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_major_version }}.noarch.rpm
disable_gpg_check: true
state: present
when: fusionfrepo.stat.exists == False
tags:
- repofusion
- basicinst
# Add Repository RPM Fusion Non-FREE
- name: Verify if RPM Fusion Non-FREE Repository exist
stat: path=/etc/yum.repos.d/rpmfusion-nonfree.repo
register: fusionnfrepo
tags:
- repofusion
- basicinst
- name: Add Repository RPM Fusion Non-FREE
ansible.builtin.dnf:
name: https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_major_version }}.noarch.rpm
disable_gpg_check: true
state: present
when: fusionnfrepo.stat.exists == False
tags:
- repofusion
- basicinst
# Add Repository Oracle VirtualBox
- name: Verify if Oracle VirtualBox Repository exist
stat: path=/etc/yum.repos.d/virtualbox.repo
register: repooracle
tags:
- repooracle
# Add Repository VScode
- name: Verify if VScode Repository exist
stat: path=/etc/yum.repos.d/vscode.repo
register: vscoderepo
tags:
- repovscode
- basicinst
- name: VScode enable Repository
ansible.builtin.yum_repository:
name: vscode
description: VSCode
baseurl: https://packages.microsoft.com/yumrepos/vscode
gpgkey: https://packages.microsoft.com/keys/microsoft.asc
enabled: yes
gpgcheck: yes
when: vscoderepo.stat.exists == False
tags:
- repovscode
- basicinst
# Fast Mirror Option for DNF
- name: Fast Mirror Option for DNF
lineinfile: dest=/etc/dnf/dnf.conf line="fastestmirror=true"
tags:
- fastdnf
- basicinst
# Parallel Download for DNF
- name: Parallel Download for DNF
lineinfile: dest=/etc/dnf/dnf.conf line="max_parallel_downloads=10"
tags:
- fastdnf
- basicinst

View File

@ -0,0 +1,25 @@
---
- name: Set up zsh as default shell
user:
name: sortion
shell: /bin/zsh
- name: Git Status Check
stat:
path: /usr/bin/git
register: git
- name: Dotfiles Clone Repository
# Check if git is installed
when: git.stat.exists
# Clone dotfiles
git:
repo: ssh://gitea@forge.chapril.org:222/UncleSamulus/.dotfiles.git
dest: /home/sortion/.dotfiles
- name: Dotfiles Install
make:
chdir: /home/sortion/.dotfiles
target: install

View File

@ -0,0 +1,106 @@
---
#
# Copyright (c) 2017 Jacques-Philippe JUBENOT
# Licensed under CC BY 3.0. All rights reserved.
#
# Role Softwares
# Clean DNF
- name: Clean DNF before Install list
command: dnf clean all
tags:
- minimum
# Install Default Softwares
- name: Install Different Packages
ansible.builtin.dnf:
name:
- audacity
- autoconf
- automake
- calibre # Ebook and numuric book software
- clamd # ClamAV Anti-Virus daemon
- clamav # ClamAV Anti-Virus
- clamav-update # ClamAV Anti-Virus definition updater
- code # Visual Studio Code
- dconf-editor # Gnome Shell DConf-Editor
- dmidecode
- dnf-plugin-system-upgrade
- easytag # Audio tagging tool and adding image in MP3 audio file
- etckeeper # Etc versionning software
- etckeeper-dnf # Etc versionning software DNF tool
- filezilla # Ftp software
- gcc # Compiliation software
- gimp
- git
- gitg
- glances # CLI System MOnitoring
- glib2
- glib2-devel
- glibc-devel
- gnome-battery-bench
- gnome-extensions-app
- gnome-nettool # Gnome Network graphical tool
- gnome-tweak-tool # Tweak Gnome shell
- gnome-sudoku # Sudoku game
- gparted # Disks and partitions manager
- gstreamer-ffmpeg # Video Codec tool
- gstreamer1-libav # Video Codec tool
- gstreamer-plugins-ugly # Video Codec tool
- gstreamer1-plugins-ugly # Video Codec tool
- gtk-murrine-engine # GTK2 engine
- gtk2-devel
- hdparm
- help2man
- htop # Monitoring tool like "top"
- iftop # Network tool - View bandwidth
- inxi # Hardware components informations
- iperf3 # Network tool - Bandwidth test
- kernel-devel
- kernel-headers
- lame # MP3 Encoder tool
- libreoffice-langpack-fr # Libreoffice language pack French
- libsass # Library for sassc CSS pre-processor language
- libselinux-python3
- libX11-devel
- lsb-core-noarch
- lynis # Security Tool - Very interesting
- lzop # Compression Tool
- mediawriter
- mkvtoolnix # MKV Codec Tools
- nano # Text editor
- nautilus-dropbox # Dropbox in Nautilus -- Legacy package
- neofetch
- nethogs # Network tool
- obs-studio # Software for video recording and live streaming
- p7zip # Compression Tool
- perl
- perl-LWP-Protocol-https
- python-dnf
- python3-dnf-plugin-snapper # Snapper Features
- rpi-imager # Raspberry card/disk imager
- sassc # CSS pre-processor language
- snapper # Snapper Features
- stacer # Monitoring and Tweaking graphic tool
- tar # Archiving tool
- tcptrack # Network tool
- tmux # Terminal Multiplexer
- vim # Text editor
- vlc # VideoLAN player
- wget
- wine
- x264-devel # Codec Dev Library
- x265-devel # Codec Dev Library
- xine-lib-extras-freeworld # Codec files Xine Library
- thunderbird
- darktable
- rawtherapee
- inkscape
- pandoc
- emacs
- texlive-scheme-full
- zsh
state: present
tags:
- instsoft