mirror of
https://github.com/fscotto/infra.git
synced 2026-09-27 19:03:47 +00:00
Remove FreeBSD profile
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# AGENTS.md
|
# AGENTS.md
|
||||||
|
|
||||||
Ansible-driven personal infrastructure repo for Fedora and Void desktops, FreeBSD transition targets, WSL, and an Ubuntu server.
|
Ansible-driven personal infrastructure repo for Fedora and Void desktops, WSL, and an Ubuntu server.
|
||||||
|
|
||||||
## Source Of Truth
|
## Source Of Truth
|
||||||
- Main orchestration: `ansible/site.yml`
|
- Main orchestration: `ansible/site.yml`
|
||||||
|
|||||||
@@ -274,13 +274,11 @@ I principali ruoli attualmente presenti sono:
|
|||||||
| ------------------------- | ----------------------------------- |
|
| ------------------------- | ----------------------------------- |
|
||||||
| base | configurazione base comune |
|
| base | configurazione base comune |
|
||||||
| packages_void | installazione pacchetti su Void |
|
| packages_void | installazione pacchetti su Void |
|
||||||
| packages_freebsd | installazione pacchetti su FreeBSD via pkg |
|
|
||||||
| packages_ubuntu | installazione pacchetti su Ubuntu |
|
| packages_ubuntu | installazione pacchetti su Ubuntu |
|
||||||
| packages_fedora | installazione pacchetti su Fedora |
|
| packages_fedora | installazione pacchetti su Fedora |
|
||||||
| packages_rocky | installazione pacchetti su Rocky Linux 9 |
|
| packages_rocky | installazione pacchetti su Rocky Linux 9 |
|
||||||
| services_runit | gestione servizi runit |
|
| services_runit | gestione servizi runit |
|
||||||
| services_systemd | gestione servizi systemd |
|
| services_systemd | gestione servizi systemd |
|
||||||
| services_freebsd | gestione servizi FreeBSD dichiarati per host |
|
|
||||||
| profile_desktop_common | bootstrap desktop Void condiviso |
|
| profile_desktop_common | bootstrap desktop Void condiviso |
|
||||||
| profile_desktop_gnome | dotfiles desktop condivisi per Fedora/GNOME |
|
| profile_desktop_gnome | dotfiles desktop condivisi per Fedora/GNOME |
|
||||||
| profile_desktop_sway | sessione desktop sway / SwayFX (Wayland) |
|
| profile_desktop_sway | sessione desktop sway / SwayFX (Wayland) |
|
||||||
@@ -304,7 +302,6 @@ Il playbook `ansible/site.yml` e attualmente composto da blocchi per asse:
|
|||||||
all -> dotfiles_common
|
all -> dotfiles_common
|
||||||
platform_void -> packages_void + services_runit
|
platform_void -> packages_void + services_runit
|
||||||
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
|
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
|
||||||
platform_freebsd -> packages_freebsd + services_freebsd
|
|
||||||
platform_fedora -> packages_fedora + services_systemd
|
platform_fedora -> packages_fedora + services_systemd
|
||||||
platform_rocky -> packages_rocky + services_systemd
|
platform_rocky -> packages_rocky + services_systemd
|
||||||
atlas -> profile_atlas
|
atlas -> profile_atlas
|
||||||
@@ -393,7 +390,6 @@ Allo stato attuale questo comando:
|
|||||||
- distribuisce i dotfiles comuni a tutti gli host
|
- distribuisce i dotfiles comuni a tutti gli host
|
||||||
- per `platform_void` applica pacchetti Void e servizi runit
|
- per `platform_void` applica pacchetti Void e servizi runit
|
||||||
- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni Sway/Niri e override specifici per host
|
- per `platform_void + graphical_desktop` applica bootstrap desktop condiviso, sessioni Sway/Niri e override specifici per host
|
||||||
- per `platform_freebsd` non applica nulla finche il gruppo resta senza host
|
|
||||||
- per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros`, `nymph` e `deadalus`
|
- per `platform_fedora` applica pacchetti Fedora e servizi systemd a `ikaros`, `nymph` e `deadalus`
|
||||||
- per `platform_fedora & role_personal_workstation` applica il layer personale a `ikaros`
|
- per `platform_fedora & role_personal_workstation` applica il layer personale a `ikaros`
|
||||||
- per `platform_fedora & desktop_gnome` applica il profilo GNOME a `ikaros` e `nymph`
|
- per `platform_fedora & desktop_gnome` applica il profilo GNOME a `ikaros` e `nymph`
|
||||||
@@ -508,10 +504,6 @@ I gruppi legacy `void` e `desktop` sono parent di compatibilita, quindi un host
|
|||||||
in `platform_void` e `graphical_desktop` continua a ricevere anche le variabili
|
in `platform_void` e `graphical_desktop` continua a ricevere anche le variabili
|
||||||
Void e desktop esistenti.
|
Void e desktop esistenti.
|
||||||
|
|
||||||
Per prove in VM sono disponibili gruppi di esempio in
|
|
||||||
`ansible/inventory/examples/platform-test-hosts.yml`, da passare esplicitamente
|
|
||||||
con `-i` insieme all'inventory principale.
|
|
||||||
|
|
||||||
Per il flusso mail desktop esiste inoltre uno script dedicato:
|
Per il flusso mail desktop esiste inoltre uno script dedicato:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -207,13 +207,11 @@ ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --di
|
|||||||
| Role | What it does |
|
| Role | What it does |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `packages_void` | Installs packages on Void. |
|
| `packages_void` | Installs packages on Void. |
|
||||||
| `packages_freebsd` | Installs packages on FreeBSD with pkg. |
|
|
||||||
| `packages_ubuntu` | Installs packages on Ubuntu. |
|
| `packages_ubuntu` | Installs packages on Ubuntu. |
|
||||||
| `packages_fedora` | Installs packages on Fedora. |
|
| `packages_fedora` | Installs packages on Fedora. |
|
||||||
| `packages_rocky` | Installs packages on Rocky Linux 9. |
|
| `packages_rocky` | Installs packages on Rocky Linux 9. |
|
||||||
| `services_runit` | Manages runit services. |
|
| `services_runit` | Manages runit services. |
|
||||||
| `services_systemd` | Manages systemd services. |
|
| `services_systemd` | Manages systemd services. |
|
||||||
| `services_freebsd` | Manages declared FreeBSD rc services. |
|
|
||||||
| `profile_desktop_common` | Shared Void desktop bootstrap. |
|
| `profile_desktop_common` | Shared Void desktop bootstrap. |
|
||||||
| `profile_desktop_gnome` | Shared Fedora/GNOME desktop dotfiles. |
|
| `profile_desktop_gnome` | Shared Fedora/GNOME desktop dotfiles. |
|
||||||
| `profile_desktop_sway` | Sway / SwayFX Wayland session. |
|
| `profile_desktop_sway` | Sway / SwayFX Wayland session. |
|
||||||
@@ -232,7 +230,6 @@ ansible-playbook ansible/site.yml --limit deadalus --tags ai_agents --check --di
|
|||||||
all -> dotfiles_common
|
all -> dotfiles_common
|
||||||
platform_void -> packages_void + services_runit
|
platform_void -> packages_void + services_runit
|
||||||
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
|
platform_void & graphical_desktop -> profile_desktop_common + profile_desktop_sway + profile_desktop_niri + profile_desktop_host
|
||||||
platform_freebsd -> packages_freebsd + services_freebsd
|
|
||||||
platform_fedora -> packages_fedora + services_systemd
|
platform_fedora -> packages_fedora + services_systemd
|
||||||
platform_rocky -> packages_rocky + services_systemd
|
platform_rocky -> packages_rocky + services_systemd
|
||||||
atlas -> profile_atlas
|
atlas -> profile_atlas
|
||||||
@@ -249,7 +246,7 @@ So, in practice:
|
|||||||
- `deadalus` gets the Fedora development layer followed by the WSL layer.
|
- `deadalus` gets the Fedora development layer followed by the WSL layer.
|
||||||
- `ubuntu_server` configures `prometheus`.
|
- `ubuntu_server` configures `prometheus`.
|
||||||
- `atlas` receives the Rocky platform layer and the NAS profile through SSH.
|
- `atlas` receives the Rocky platform layer and the NAS profile through SSH.
|
||||||
- Empty `platform_void` and `platform_freebsd` groups do nothing until they get a host.
|
- Empty `platform_void` groups do nothing until they get a host.
|
||||||
- The playbook never restarts the display manager during a run.
|
- The playbook never restarts the display manager during a run.
|
||||||
- `secrets/vault.yml` and then `secrets/vault.local.yml` are loaded only when present.
|
- `secrets/vault.yml` and then `secrets/vault.local.yml` are loaded only when present.
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
# Optional inventory overlay for VM tests. It is not loaded by ansible.cfg.
|
|
||||||
all:
|
|
||||||
children:
|
|
||||||
platform_freebsd:
|
|
||||||
hosts:
|
|
||||||
freebsdtest:
|
|
||||||
ansible_connection: local
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
---
|
|
||||||
platform_profile: freebsd
|
|
||||||
platform_family: freebsd
|
|
||||||
platform_package_manager: pkg
|
|
||||||
platform_service_manager: rc
|
|
||||||
ansible_python_interpreter: /usr/local/bin/python3
|
|
||||||
|
|
||||||
vim_plugin_distro_packages:
|
|
||||||
- fzf
|
|
||||||
vim_plugin_source_plugins:
|
|
||||||
- name: fzf
|
|
||||||
repo: https://github.com/junegunn/fzf.git
|
|
||||||
version: v0.72.0
|
|
||||||
- name: fzf.vim
|
|
||||||
repo: https://github.com/junegunn/fzf.vim.git
|
|
||||||
version: 34a564c81f36047f50e593c1656f4580ff75ccca
|
|
||||||
- name: vim-fugitive
|
|
||||||
repo: https://github.com/tpope/vim-fugitive.git
|
|
||||||
version: 3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0
|
|
||||||
|
|
||||||
effective_user_group: "{{ user_group }}"
|
|
||||||
effective_user_home: "/home/{{ effective_username }}"
|
|
||||||
user_home: "/home/{{ username }}"
|
|
||||||
|
|
||||||
freebsd_packages_base:
|
|
||||||
- bash
|
|
||||||
- bash-completion
|
|
||||||
- bat
|
|
||||||
- curl
|
|
||||||
- fzf
|
|
||||||
- git
|
|
||||||
- jq
|
|
||||||
- python3
|
|
||||||
- ripgrep
|
|
||||||
- rsync
|
|
||||||
- tmux
|
|
||||||
- tree
|
|
||||||
- unzip
|
|
||||||
- vim
|
|
||||||
- wget
|
|
||||||
- zip
|
|
||||||
- zoxide
|
|
||||||
|
|
||||||
freebsd_development_packages:
|
|
||||||
- clang
|
|
||||||
- cmake
|
|
||||||
- gdb
|
|
||||||
- go
|
|
||||||
- gmake
|
|
||||||
- node
|
|
||||||
- npm
|
|
||||||
- pkgconf
|
|
||||||
- py311-pip
|
|
||||||
- rust
|
|
||||||
- shellcheck
|
|
||||||
@@ -13,9 +13,6 @@ all:
|
|||||||
deadalus:
|
deadalus:
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
platform_freebsd:
|
|
||||||
hosts: {}
|
|
||||||
|
|
||||||
platform_rocky:
|
platform_rocky:
|
||||||
hosts:
|
hosts:
|
||||||
atlas:
|
atlas:
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install packages on FreeBSD
|
|
||||||
tags: [packages]
|
|
||||||
community.general.pkgng:
|
|
||||||
name: >-
|
|
||||||
{{
|
|
||||||
(
|
|
||||||
(freebsd_packages_base | default([]))
|
|
||||||
+ (freebsd_development_packages | default([]))
|
|
||||||
+ (host_packages | default([]))
|
|
||||||
)
|
|
||||||
| unique
|
|
||||||
}}
|
|
||||||
state: present
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Enable FreeBSD rc services
|
|
||||||
tags: [services, packages]
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: "{{ item }}"
|
|
||||||
enabled: true
|
|
||||||
state: started
|
|
||||||
loop: "{{ host_enabled_services | default([]) }}"
|
|
||||||
loop_control:
|
|
||||||
label: "{{ item }}"
|
|
||||||
@@ -53,14 +53,6 @@
|
|||||||
- profile_desktop_niri
|
- profile_desktop_niri
|
||||||
- profile_desktop_host
|
- profile_desktop_host
|
||||||
|
|
||||||
- name: Configure FreeBSD platform
|
|
||||||
hosts: platform_freebsd
|
|
||||||
become: true
|
|
||||||
|
|
||||||
roles:
|
|
||||||
- packages_freebsd
|
|
||||||
- services_freebsd
|
|
||||||
|
|
||||||
- name: Configure Fedora platform
|
- name: Configure Fedora platform
|
||||||
hosts: platform_fedora
|
hosts: platform_fedora
|
||||||
become: true
|
become: true
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
# =========================
|
# =========================
|
||||||
# Portable Bash config
|
# Portable Bash config
|
||||||
# Target: Void Linux + FreeBSD
|
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
# Exit if not interactive
|
# Exit if not interactive
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
# --- environment detection
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Linux) PLATFORM="linux" ;;
|
|
||||||
FreeBSD) PLATFORM="freebsd" ;;
|
|
||||||
*) PLATFORM="other" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
export PLATFORM
|
|
||||||
|
|
||||||
# --- history
|
# --- history
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
HISTFILESIZE=20000
|
HISTFILESIZE=20000
|
||||||
@@ -438,15 +428,10 @@ extract() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# =========================
|
# =========================
|
||||||
# OS-specific small touches
|
# Small touches
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
if [ "$PLATFORM" = "freebsd" ]; then
|
|
||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias du='du -h'
|
alias du='du -h'
|
||||||
elif [ "$PLATFORM" = "linux" ]; then
|
|
||||||
alias df='df -h'
|
|
||||||
alias du='du -h'
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"
|
[ -r "$HOME/.bashrc.aliases" ] && . "$HOME/.bashrc.aliases"
|
||||||
|
|||||||
Reference in New Issue
Block a user