2020-10-11 15:09:15 +02:00
|
|
|
---
|
2023-08-27 11:43:02 +02:00
|
|
|
- name: Bootstrap fresh installation
|
2020-10-11 15:09:15 +02:00
|
|
|
hosts: all
|
2023-08-27 11:43:02 +02:00
|
|
|
gather_facts: true
|
2020-10-11 15:09:15 +02:00
|
|
|
roles:
|
2023-08-27 11:43:02 +02:00
|
|
|
# Handle distribution-specific changes before the generic ones
|
2024-12-12 16:04:19 +01:00
|
|
|
- role: os_fedora
|
2023-08-27 11:43:02 +02:00
|
|
|
become: true
|
2022-03-13 01:33:20 +01:00
|
|
|
when: ansible_distribution == "Fedora"
|
2023-08-27 11:43:02 +02:00
|
|
|
|
2024-12-12 16:04:19 +01:00
|
|
|
- role: os_el
|
2023-08-30 15:39:18 +02:00
|
|
|
become: true
|
|
|
|
when: ansible_distribution in [ "AlmaLinux", "CentOS" ]
|
|
|
|
|
2023-08-27 11:43:02 +02:00
|
|
|
# Upgrade all packages and install the basic-bitch ones
|
2024-12-12 13:36:54 +01:00
|
|
|
- role: base_system
|
2023-08-27 11:43:02 +02:00
|
|
|
become: true
|
|
|
|
|
2024-07-10 15:32:35 +02:00
|
|
|
# Enable Cockpit
|
2024-07-12 21:19:42 +02:00
|
|
|
- role: cockpit
|
2024-07-10 15:32:35 +02:00
|
|
|
become: true
|
|
|
|
tags: cockpit
|
|
|
|
|
2023-08-27 11:43:02 +02:00
|
|
|
# Enable Flathub repository and install configured flatpaks
|
2024-07-12 21:19:42 +02:00
|
|
|
- role: flatpak
|
2024-07-07 17:39:42 +02:00
|
|
|
when: ansible_distribution != "Ubuntu"
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: flatpak
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Install Podman and configure UIDs/GIDs for rootless usage
|
2024-07-12 21:19:42 +02:00
|
|
|
- role: podman
|
2023-08-27 11:43:02 +02:00
|
|
|
become: true
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: podman
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Install and configure SSH server
|
2024-12-12 16:10:22 +01:00
|
|
|
- role: ssh_server
|
2023-08-27 11:43:02 +02:00
|
|
|
become: true
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: sshd
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Handle basic user configuration
|
2024-12-12 13:36:54 +01:00
|
|
|
- base_desktop
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Shell utilities
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: shell/zsh
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: zsh
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: shell/tmux
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: tmux
|
2023-08-27 11:43:02 +02:00
|
|
|
|
2024-06-03 21:53:44 +02:00
|
|
|
# Directory for temporary files
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: tmpfiles
|
2024-06-03 21:53:44 +02:00
|
|
|
become: true
|
|
|
|
tags: tmpfiles
|
|
|
|
|
2023-08-27 11:43:02 +02:00
|
|
|
# Configure git
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: git
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: git
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Configure ssh
|
2024-12-12 16:10:22 +01:00
|
|
|
- role: ssh_client
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: ssh
|
2023-08-27 11:43:02 +02:00
|
|
|
|
2023-09-16 23:08:02 +02:00
|
|
|
# Set up GPG
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: gpg
|
2023-09-16 23:08:02 +02:00
|
|
|
tags: gpg
|
|
|
|
|
2023-08-27 11:43:02 +02:00
|
|
|
# Configure Alacritty terminal
|
2024-12-12 16:50:02 +01:00
|
|
|
- role: terminal_alacritty
|
2023-08-27 11:43:02 +02:00
|
|
|
tags: alacritty
|
|
|
|
|
|
|
|
# Configure Kitty terminal
|
2024-12-12 16:50:02 +01:00
|
|
|
- role: terminal_kitty
|
2023-08-27 11:43:02 +02:00
|
|
|
tags: kitty
|
|
|
|
|
2023-08-30 17:03:59 +02:00
|
|
|
# Install fonts
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: fonts
|
2023-08-30 17:03:59 +02:00
|
|
|
tags: fonts
|
|
|
|
|
2023-08-27 11:43:02 +02:00
|
|
|
# Install Bitwarden CLI
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: secrets/bw
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: bw
|
2023-08-27 11:43:02 +02:00
|
|
|
|
2023-09-06 11:42:47 +02:00
|
|
|
# Install HashiCorp Vault
|
2024-07-12 21:23:02 +02:00
|
|
|
- role: secrets/hcv
|
2023-09-06 11:42:47 +02:00
|
|
|
tags: hcv
|
2023-08-27 11:43:02 +02:00
|
|
|
|
|
|
|
# Install and configure Emacs
|
2024-12-12 13:38:27 +01:00
|
|
|
- role: editor_emacs
|
2023-08-27 11:43:02 +02:00
|
|
|
tags: emacs
|
|
|
|
|
|
|
|
# Install and configure VSCode
|
2024-12-12 13:38:27 +01:00
|
|
|
- role: editor_vscode
|
2023-08-30 15:10:39 +02:00
|
|
|
tags: vscode
|
2023-09-09 15:19:45 +02:00
|
|
|
|
|
|
|
# Install and configure Helix
|
2024-12-12 13:38:27 +01:00
|
|
|
- role: editor_helix
|
2023-09-09 15:19:45 +02:00
|
|
|
tags: helix
|
2024-07-12 19:53:09 +02:00
|
|
|
|
2024-12-12 13:38:27 +01:00
|
|
|
# Install and configure neovim
|
|
|
|
- role: editor_neovim
|
|
|
|
tags: neovim
|
|
|
|
|
2024-07-12 19:53:09 +02:00
|
|
|
tasks:
|
|
|
|
# Install the Wireguard VPNs
|
|
|
|
- name: Wireguard
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: wg
|
|
|
|
apply:
|
|
|
|
become: true
|
|
|
|
with_items: "{{ wg_connections }}"
|
|
|
|
vars:
|
|
|
|
wg_ifname: "{{ item.ifname }}"
|
|
|
|
wg_generate_keypair: "{{ item.generate_keypair }}"
|
|
|
|
wg_domain: "{{ item.domain }}"
|
|
|
|
wg_gateway: "{{ item.gateway }}"
|
|
|
|
wg_address: "{{ item.address }}"
|
|
|
|
wg_peers: "{{ item.peers }}"
|
|
|
|
tags: wireguard
|
2024-11-18 15:21:19 +01:00
|
|
|
|
|
|
|
handlers:
|
|
|
|
- name: Import common handlers
|
|
|
|
ansible.builtin.import_tasks: ../handlers/main.yml
|