giphy.mp4
arch-linux-setup/
├── inventory/
│ ├── localhost.ini
├── playbooks/
│ ├── base.yml
│ ├── packages.yml
│ ├── dotfiles.yml
├── roles/
│ ├── base/
│ │ ├── tasks.yml
│ ├──packages/
│ │ ├── tasks.yml
│ └── dotfiles/
│ ├── tasks.yml
├── vars/
│ ├── common.yml
├── ansible.cfg
├── README.md
This file defines the machine where Ansible will run. In this case, it's set up for local execution without SSH. If you want to expand, you can add configurations for remote servers or even dynamic inventories for virtual machines or containers.
Handles the initial setup of your Arch Linux system. This includes disk partitioning, installing the base system, and setting up the bootloader. You could expand this to include disk encryption (LUKS), RAID configurations, or other advanced disk setups.
This playbook installs all the necessary tools and applications. It uses pacman
for official packages and yay
for AUR packages. You could enhance it with custom profiles like "developer", "gaming", or "minimal" to tailor the installed packages to different needs.
This playbook manages your dotfiles by cloning your repository and linking the necessary configuration files into your home directory. In the future, you could add features like automatic backups of existing files before overwriting them or support for different configuration profiles (e.g., work vs. personal).
This role focuses on the system’s base configuration. It sets up users, installs essential services like NetworkManager, and applies any required basic configurations. Expansion ideas include adding support for UEFI vs. Legacy BIOS setups or managing extra system services like SSH or Firewalld.
Installs all your specified packages. It separates installation between pacman
packages and AUR packages using yay
. You could make this more dynamic by including conditional installs based on the type of machine (e.g., laptop, desktop, server) or by adding optional features toggled through variables.
Handles your dotfiles. It clones your repository and creates symbolic links for configurations in $HOME
. You could expand it to manage multiple repositories or provide automated backups of existing files before replacing them.
This file stores shared variables used across playbooks and roles. It includes settings like the username, lists of packages (pacman
and aur
), and any other reusable configurations. Future improvements could include adding regional settings (timezone, keyboard layout) or flags for optional installations.
Defines how Ansible behaves. It specifies where to find roles, inventories, and how to handle privileges. This file could be expanded to support SSH configurations or other advanced inventory setups for remote execution.
The main documentation for the project. It explains how to use the playbooks, install Ansible, and run the setup. You could expand this by adding troubleshooting tips, a guide for contributions, or explanations of the project’s structure.
-
Support for Multiple Systems
Add configurations for derivatives like Manjaro or EndeavourOS. -
Automated GUI Setup
Include setups for graphical environments like GNOME or i3wm. -
Custom Profiles
Create profiles like "developer", "gamer", or "server" to streamline installations. -
Testing and Validation
Use tools like Molecule to test playbooks and ensure everything works as expected. -
Backup Integration
Automate restoration of user data and configurations from backups. -
Resource Optimization
Check available resources like disk space or memory and adjust the setup accordingly.
- Define the local host
- Reference
ansible_connection=local
- Reference
hosts: localhost
- Use
become: true
for privilege escalation - Include the
base
role - Use variables from
vars/common.yml
(no explanation, just reference them) - Main tasks for installing and configuring the base system (list tasks in YAML format)
- Reference
hosts: localhost
- Use
become: true
for privilege escalation - Include the
packages
role - Use variables for package lists (from
vars/common.yml
) - Main tasks for installing official repo packages and AUR packages
- Reference
hosts: localhost
- Use
become: true
for privilege escalation - Include the
dotfiles
role - Use variables for the dotfiles repository (from
vars/common.yml
) - Tasks to clone the repository and create symbolic links
- Tasks to partition the disk
- Tasks to format the partitions
- Tasks to mount the base system
- Tasks to
pacstrap
the base system - Tasks to generate
fstab
- Tasks to configure timezone, locale, and hostname
- Tasks to install the bootloader
- Tasks to update the package database
- Tasks to install packages using pacman (from the list in
vars/common.yml
) - Tasks to install
yay
- Tasks to install AUR packages (from the list in
vars/common.yml
)
- Tasks to clone the dotfiles repository (using variables from
vars/common.yml
) - Tasks to create symbolic links for dotfiles
- Tasks to ensure correct permissions for config files
- Variable for the final username
- Variable for the list of pacman packages
- Variable for the list of AUR packages
- Variable for the dotfiles repository URL
- Variable for timezone and locale
- Basic Ansible settings
- Path to roles
- Define the inventory
- Minimum recommended settings (privilege escalation, host_key_checking, etc.)
- Short description of the project
- Basic instructions to run playbooks
- Prerequisites (having Ansible, live environment with internet)
- References to files and roles