mirror of
https://github.com/fscotto/infra.git
synced 2026-07-29 16:20:01 +00:00
Switch to Linux Mint and FreeBSD
This commit is contained in:
34
ansible/inventory/examples/platform-test-hosts.yml
Normal file
34
ansible/inventory/examples/platform-test-hosts.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# Optional inventory overlay for VM tests. It is not loaded by ansible.cfg.
|
||||
all:
|
||||
children:
|
||||
platform_mint:
|
||||
hosts:
|
||||
minttest:
|
||||
ansible_connection: local
|
||||
|
||||
platform_freebsd:
|
||||
hosts:
|
||||
freebsdtest:
|
||||
ansible_connection: local
|
||||
|
||||
graphical_desktop:
|
||||
hosts:
|
||||
minttest:
|
||||
freebsdtest:
|
||||
|
||||
role_personal_workstation:
|
||||
hosts:
|
||||
minttest:
|
||||
|
||||
role_lab:
|
||||
hosts:
|
||||
freebsdtest:
|
||||
|
||||
desktop_cinnamon:
|
||||
hosts:
|
||||
minttest:
|
||||
|
||||
desktop_hyprland:
|
||||
hosts:
|
||||
freebsdtest:
|
||||
22
ansible/inventory/group_vars/desktop_cinnamon.yml
Normal file
22
ansible/inventory/group_vars/desktop_cinnamon.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
desktop_profile: cinnamon
|
||||
desktop_default_session: cinnamon
|
||||
|
||||
cinnamon_theme_gtk: Mint-Y-Dark-Aqua
|
||||
cinnamon_theme_icons: Mint-Y-Aqua
|
||||
cinnamon_font_ui: Sans 10
|
||||
cinnamon_font_monospace: Monospace 10
|
||||
|
||||
cinnamon_dconf_settings:
|
||||
- key: /org/cinnamon/desktop/interface/gtk-theme
|
||||
value: "'{{ cinnamon_theme_gtk }}'"
|
||||
- key: /org/cinnamon/desktop/interface/icon-theme
|
||||
value: "'{{ cinnamon_theme_icons }}'"
|
||||
- key: /org/cinnamon/desktop/interface/font-name
|
||||
value: "'{{ cinnamon_font_ui }}'"
|
||||
- key: /org/cinnamon/desktop/interface/monospace-font-name
|
||||
value: "'{{ cinnamon_font_monospace }}'"
|
||||
- key: /org/cinnamon/desktop/interface/clock-use-24h
|
||||
value: "true"
|
||||
- key: /org/cinnamon/desktop/wm/preferences/button-layout
|
||||
value: "'menu:minimize,maximize,close'"
|
||||
3
ansible/inventory/group_vars/desktop_hyprland.yml
Normal file
3
ansible/inventory/group_vars/desktop_hyprland.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
desktop_profile: hyprland
|
||||
desktop_default_session: hyprland
|
||||
2
ansible/inventory/group_vars/desktop_sway.yml
Normal file
2
ansible/inventory/group_vars/desktop_sway.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
desktop_profile: sway
|
||||
3
ansible/inventory/group_vars/graphical_desktop.yml
Normal file
3
ansible/inventory/group_vars/graphical_desktop.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
host_capabilities:
|
||||
- graphical_desktop
|
||||
95
ansible/inventory/group_vars/platform_freebsd.yml
Normal file
95
ansible/inventory/group_vars/platform_freebsd.yml
Normal file
@@ -0,0 +1,95 @@
|
||||
---
|
||||
platform_profile: freebsd
|
||||
platform_family: freebsd
|
||||
platform_package_manager: pkg
|
||||
platform_service_manager: rc
|
||||
ansible_python_interpreter: /usr/local/bin/python3
|
||||
|
||||
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
|
||||
|
||||
freebsd_desktop_common_packages:
|
||||
- dbus
|
||||
- dconf
|
||||
- firefox
|
||||
- fontconfig
|
||||
- gnome-keyring
|
||||
- libsecret
|
||||
- mpv
|
||||
- pinentry-gnome
|
||||
- pipewire
|
||||
- polkit
|
||||
- thunderbird
|
||||
- wireplumber
|
||||
- xdg-desktop-portal
|
||||
|
||||
freebsd_hyprland_packages:
|
||||
- alacritty
|
||||
- cliphist
|
||||
- dunst
|
||||
- foot
|
||||
- grim
|
||||
- hypridle
|
||||
- hyprland
|
||||
- hyprlock
|
||||
- hyprpaper
|
||||
- rofi-wayland
|
||||
- seatd
|
||||
- slurp
|
||||
- waybar
|
||||
- wl-clipboard
|
||||
- xdg-desktop-portal-gtk
|
||||
- xdg-desktop-portal-hyprland
|
||||
- xwayland
|
||||
|
||||
freebsd_lab_packages:
|
||||
- lldb
|
||||
- llvm
|
||||
- podman
|
||||
- qemu
|
||||
- smartmontools
|
||||
|
||||
freebsd_rc_conf:
|
||||
- name: dbus_enable
|
||||
value: "YES"
|
||||
- name: seatd_enable
|
||||
value: "YES"
|
||||
|
||||
freebsd_enabled_services:
|
||||
- dbus
|
||||
- seatd
|
||||
|
||||
freebsd_xdg_config_dir: /usr/local/etc/xdg
|
||||
65
ansible/inventory/group_vars/platform_mint.yml
Normal file
65
ansible/inventory/group_vars/platform_mint.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
platform_profile: mint
|
||||
platform_family: debian
|
||||
platform_package_manager: apt
|
||||
platform_service_manager: systemd
|
||||
|
||||
mint_manage_flatpak: true
|
||||
mint_flatpak_remote_name: flathub
|
||||
mint_flatpak_remote_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
mint_packages_base:
|
||||
- ca-certificates
|
||||
- curl
|
||||
- flatpak
|
||||
- gpg
|
||||
- htop
|
||||
- make
|
||||
- python3-pip
|
||||
- ripgrep
|
||||
- rsync
|
||||
- shellcheck
|
||||
|
||||
mint_development_packages:
|
||||
- build-essential
|
||||
- clang
|
||||
- clang-tools
|
||||
- cmake
|
||||
- gdb
|
||||
- golang
|
||||
- nodejs
|
||||
- npm
|
||||
- pkg-config
|
||||
- python3-venv
|
||||
|
||||
mint_desktop_common_packages:
|
||||
- dconf-cli
|
||||
- deja-dup
|
||||
- emacs
|
||||
- firefox
|
||||
- fonts-liberation
|
||||
- fonts-noto-color-emoji
|
||||
- gnome-keyring
|
||||
- libsecret-tools
|
||||
- mpv
|
||||
- pinentry-gnome3
|
||||
- rclone
|
||||
- thunderbird
|
||||
- xdg-user-dirs
|
||||
|
||||
mint_cinnamon_packages:
|
||||
- cinnamon
|
||||
- cinnamon-control-center
|
||||
- cinnamon-screensaver
|
||||
- lightdm
|
||||
- slick-greeter
|
||||
- xdg-desktop-portal
|
||||
- xdg-desktop-portal-gtk
|
||||
|
||||
mint_personal_workstation_packages:
|
||||
- libreoffice
|
||||
- meld
|
||||
- pdfarranger
|
||||
- vim
|
||||
|
||||
mint_flatpak_packages: []
|
||||
5
ansible/inventory/group_vars/platform_void.yml
Normal file
5
ansible/inventory/group_vars/platform_void.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
platform_profile: void
|
||||
platform_family: void
|
||||
platform_package_manager: xbps
|
||||
platform_service_manager: runit
|
||||
11
ansible/inventory/group_vars/role_lab.yml
Normal file
11
ansible/inventory/group_vars/role_lab.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
machine_role: lab
|
||||
role_profile: lab
|
||||
role_stability: experimental
|
||||
experimental_profile: true
|
||||
|
||||
lab_workspace_directories:
|
||||
- path: "{{ user_home }}/Lab"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/Scratch"
|
||||
mode: "0755"
|
||||
24
ansible/inventory/group_vars/role_personal_workstation.yml
Normal file
24
ansible/inventory/group_vars/role_personal_workstation.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
machine_role: personal_workstation
|
||||
role_profile: personal_workstation
|
||||
role_stability: stable
|
||||
|
||||
personal_workstation_directories:
|
||||
- path: "{{ user_home }}/Documents"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/Downloads"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/Org"
|
||||
mode: "0755"
|
||||
- path: "{{ user_home }}/Remotes"
|
||||
mode: "0755"
|
||||
|
||||
personal_workstation_dotfiles:
|
||||
- src: .gitignore_global
|
||||
dest: .gitignore_global
|
||||
mode: "0644"
|
||||
- src: .themes.gitignore
|
||||
dest: .themes.gitignore
|
||||
mode: "0644"
|
||||
|
||||
personal_workstation_flatpak_packages: []
|
||||
@@ -1,13 +1,6 @@
|
||||
---
|
||||
hostname: ikaros
|
||||
|
||||
desktop_sessions_enabled:
|
||||
- sway
|
||||
- hyprland
|
||||
|
||||
desktop_default_session: hyprland
|
||||
desktop_default_session_env: wayland
|
||||
|
||||
host_packages:
|
||||
- openssh
|
||||
- mesa-dri
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
---
|
||||
hostname: nymph
|
||||
|
||||
desktop_sessions_enabled:
|
||||
- sway
|
||||
- hyprland
|
||||
|
||||
desktop_default_session: hyprland
|
||||
desktop_default_session_env: wayland
|
||||
desktop_emptty_session_error_logging: rotate
|
||||
|
||||
host_packages:
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
---
|
||||
all:
|
||||
children:
|
||||
platform_void:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
platform_mint:
|
||||
hosts: {}
|
||||
|
||||
platform_freebsd:
|
||||
hosts: {}
|
||||
|
||||
void:
|
||||
children:
|
||||
platform_void:
|
||||
|
||||
graphical_desktop:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
@@ -9,12 +26,36 @@ all:
|
||||
ansible_connection: local
|
||||
|
||||
desktop:
|
||||
children:
|
||||
graphical_desktop:
|
||||
|
||||
role_personal_workstation:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
|
||||
role_lab:
|
||||
hosts:
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
desktop_sway:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
desktop_hyprland:
|
||||
hosts:
|
||||
ikaros:
|
||||
ansible_connection: local
|
||||
nymph:
|
||||
ansible_connection: local
|
||||
|
||||
desktop_cinnamon:
|
||||
hosts: {}
|
||||
|
||||
ubuntu:
|
||||
children:
|
||||
workstation_dev_wsl:
|
||||
|
||||
29
ansible/roles/packages_freebsd/tasks/main.yml
Normal file
29
ansible/roles/packages_freebsd/tasks/main.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Install packages on FreeBSD
|
||||
tags: [packages]
|
||||
community.general.pkgng:
|
||||
name: >-
|
||||
{{
|
||||
(
|
||||
(freebsd_packages_base | default([]))
|
||||
+ (freebsd_development_packages | default([]))
|
||||
+ (
|
||||
(freebsd_desktop_common_packages | default([]))
|
||||
if 'graphical_desktop' in group_names
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(freebsd_hyprland_packages | default([]))
|
||||
if 'desktop_hyprland' in group_names
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(freebsd_lab_packages | default([]))
|
||||
if 'role_lab' in group_names
|
||||
else []
|
||||
)
|
||||
+ (host_packages | default([]))
|
||||
)
|
||||
| unique
|
||||
}}
|
||||
state: present
|
||||
80
ansible/roles/packages_mint/tasks/main.yml
Normal file
80
ansible/roles/packages_mint/tasks/main.yml
Normal file
@@ -0,0 +1,80 @@
|
||||
---
|
||||
- name: Refresh apt package cache on Linux Mint
|
||||
tags: [packages]
|
||||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Install packages on Linux Mint
|
||||
tags: [packages]
|
||||
ansible.builtin.apt:
|
||||
name: >-
|
||||
{{
|
||||
(
|
||||
(common_packages | default([]))
|
||||
+ (mint_packages_base | default([]))
|
||||
+ (mint_development_packages | default([]))
|
||||
+ (
|
||||
(mint_desktop_common_packages | default([]))
|
||||
if 'graphical_desktop' in group_names
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(mint_cinnamon_packages | default([]))
|
||||
if 'desktop_cinnamon' in group_names
|
||||
else []
|
||||
)
|
||||
+ (
|
||||
(mint_personal_workstation_packages | default([]))
|
||||
if 'role_personal_workstation' in group_names
|
||||
else []
|
||||
)
|
||||
+ (host_packages | default([]))
|
||||
)
|
||||
| unique
|
||||
}}
|
||||
state: present
|
||||
|
||||
- name: Ensure Flathub remote is configured on Linux Mint
|
||||
tags: [packages]
|
||||
community.general.flatpak_remote:
|
||||
name: "{{ mint_flatpak_remote_name | default('flathub') }}"
|
||||
state: present
|
||||
flatpakrepo_url: "{{ mint_flatpak_remote_url | default('https://dl.flathub.org/repo/flathub.flatpakrepo') }}"
|
||||
when:
|
||||
- mint_manage_flatpak | default(true)
|
||||
- >-
|
||||
(
|
||||
(mint_flatpak_packages | default([]))
|
||||
+ (personal_workstation_flatpak_packages | default([]))
|
||||
) | length > 0
|
||||
|
||||
- name: Install Linux Mint Flatpak applications
|
||||
tags: [packages]
|
||||
community.general.flatpak:
|
||||
name: >-
|
||||
{{
|
||||
(
|
||||
(mint_flatpak_packages | default([]))
|
||||
+ (
|
||||
(personal_workstation_flatpak_packages | default([]))
|
||||
if 'role_personal_workstation' in group_names
|
||||
else []
|
||||
)
|
||||
)
|
||||
| unique
|
||||
}}
|
||||
state: present
|
||||
remote: "{{ mint_flatpak_remote_name | default('flathub') }}"
|
||||
method: system
|
||||
when:
|
||||
- mint_manage_flatpak | default(true)
|
||||
- >-
|
||||
(
|
||||
(mint_flatpak_packages | default([]))
|
||||
+ (
|
||||
(personal_workstation_flatpak_packages | default([]))
|
||||
if 'role_personal_workstation' in group_names
|
||||
else []
|
||||
)
|
||||
) | length > 0
|
||||
27
ansible/roles/profile_desktop_cinnamon/tasks/main.yml
Normal file
27
ansible/roles/profile_desktop_cinnamon/tasks/main.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Ensure Cinnamon user config directories exist
|
||||
tags: [dotfiles, dotfiles:desktop, cinnamon]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ user_home }}/.config"
|
||||
- "{{ user_home }}/.local"
|
||||
- "{{ user_home }}/.local/share"
|
||||
|
||||
- name: Apply Cinnamon dconf settings
|
||||
tags: [cinnamon]
|
||||
community.general.dconf:
|
||||
key: "{{ item.key }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
become: true
|
||||
become_user: "{{ username }}"
|
||||
environment:
|
||||
HOME: "{{ user_home }}"
|
||||
loop: "{{ cinnamon_dconf_settings | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
@@ -0,0 +1,4 @@
|
||||
[preferred]
|
||||
default=gtk
|
||||
org.freedesktop.impl.portal.Screenshot=hyprland
|
||||
org.freedesktop.impl.portal.ScreenCast=hyprland
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
- name: Ensure FreeBSD Hyprland user config directories exist
|
||||
tags: [dotfiles, dotfiles:desktop, hyprland]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "{{ user_home }}/.config"
|
||||
- "{{ user_home }}/.config/alacritty"
|
||||
- "{{ user_home }}/.config/dunst"
|
||||
- "{{ user_home }}/.config/foot"
|
||||
- "{{ user_home }}/.config/hypr"
|
||||
- "{{ user_home }}/.config/rofi"
|
||||
- "{{ user_home }}/.config/waybar"
|
||||
- "{{ user_home }}/.local"
|
||||
- "{{ user_home }}/.local/bin"
|
||||
|
||||
- name: Copy common Hyprland desktop dotfiles on FreeBSD
|
||||
tags: [dotfiles, dotfiles:desktop, hyprland]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/desktop/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ desktop_hyprland_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
|
||||
- name: Render FreeBSD Hyprland session launcher
|
||||
tags: [packages, services, hyprland]
|
||||
ansible.builtin.template:
|
||||
src: start-hyprland-session.j2
|
||||
dest: /usr/local/bin/start-hyprland-session
|
||||
owner: root
|
||||
group: wheel
|
||||
mode: "0755"
|
||||
|
||||
- name: Ensure FreeBSD xdg-desktop-portal config directory exists
|
||||
tags: [packages, services, hyprland, portal]
|
||||
ansible.builtin.file:
|
||||
path: "{{ freebsd_xdg_config_dir | default('/usr/local/etc/xdg') }}/xdg-desktop-portal"
|
||||
state: directory
|
||||
owner: root
|
||||
group: wheel
|
||||
mode: "0755"
|
||||
|
||||
- name: Configure xdg-desktop-portal backend preferences for FreeBSD Hyprland
|
||||
tags: [packages, services, hyprland, portal]
|
||||
ansible.builtin.copy:
|
||||
src: hyprland-portals.conf
|
||||
dest: "{{ freebsd_xdg_config_dir | default('/usr/local/etc/xdg') }}/xdg-desktop-portal/hyprland-portals.conf"
|
||||
owner: root
|
||||
group: wheel
|
||||
mode: "0644"
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -r /etc/profile ] && . /etc/profile
|
||||
[ -r "$HOME/.profile" ] && . "$HOME/.profile"
|
||||
|
||||
export XDG_CURRENT_DESKTOP=Hyprland
|
||||
export XDG_SESSION_DESKTOP=Hyprland
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export QT_QPA_PLATFORM='wayland;xcb'
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export GDK_BACKEND='wayland,x11'
|
||||
|
||||
export SSH_AUTH_SOCK="$HOME/.local/state/ssh-agent/socket"
|
||||
|
||||
[ -r "$HOME/.config/hypr/session-env" ] && . "$HOME/.config/hypr/session-env"
|
||||
|
||||
if command -v dbus-run-session >/dev/null 2>&1; then
|
||||
exec dbus-run-session Hyprland
|
||||
fi
|
||||
|
||||
exec Hyprland
|
||||
12
ansible/roles/profile_lab/tasks/main.yml
Normal file
12
ansible/roles/profile_lab/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
- name: Ensure lab workspace directories exist
|
||||
tags: [dotfiles]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ lab_workspace_directories | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
24
ansible/roles/profile_personal_workstation/tasks/main.yml
Normal file
24
ansible/roles/profile_personal_workstation/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Ensure personal workstation directories exist
|
||||
tags: [dotfiles, dotfiles:workstation]
|
||||
ansible.builtin.file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ personal_workstation_directories | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
||||
- name: Copy personal workstation dotfiles
|
||||
tags: [dotfiles, dotfiles:workstation]
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/../dotfiles/workstation/{{ item.src }}"
|
||||
dest: "{{ user_home }}/{{ item.dest }}"
|
||||
owner: "{{ username }}"
|
||||
group: "{{ user_group }}"
|
||||
mode: "{{ item.mode }}"
|
||||
loop: "{{ personal_workstation_dotfiles | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.dest }}"
|
||||
20
ansible/roles/services_freebsd/tasks/main.yml
Normal file
20
ansible/roles/services_freebsd/tasks/main.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Configure FreeBSD rc.conf values
|
||||
tags: [services, packages]
|
||||
community.general.sysrc:
|
||||
name: "{{ item.name }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
loop: "{{ freebsd_rc_conf | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Enable FreeBSD rc services
|
||||
tags: [services, packages]
|
||||
ansible.builtin.service:
|
||||
name: "{{ item }}"
|
||||
enabled: true
|
||||
state: started
|
||||
loop: "{{ freebsd_enabled_services | default([]) + host_enabled_services | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
@@ -18,4 +18,3 @@
|
||||
loop: "{{ host_enabled_services | default([]) }}"
|
||||
loop_control:
|
||||
label: "{{ item }}"
|
||||
|
||||
|
||||
@@ -1,28 +1,40 @@
|
||||
---
|
||||
- hosts: all
|
||||
- name: Configure common user environment
|
||||
hosts: all
|
||||
become: true
|
||||
pre_tasks:
|
||||
- name: Load local vault variables when available
|
||||
tags: [always]
|
||||
ansible.builtin.include_vars:
|
||||
file: "{{ playbook_dir }}/../secrets/vault.yml"
|
||||
when: lookup('ansible.builtin.fileglob', playbook_dir + '/../secrets/vault.yml', errors='ignore', wantlist=True) | length > 0
|
||||
when: >-
|
||||
lookup('ansible.builtin.fileglob', playbook_dir + '/../secrets/vault.yml',
|
||||
errors='ignore', wantlist=True) | length > 0
|
||||
|
||||
- name: Load machine-local vault variables when available
|
||||
tags: [always]
|
||||
ansible.builtin.include_vars:
|
||||
file: "{{ playbook_dir }}/../secrets/vault.local.yml"
|
||||
when: lookup('ansible.builtin.fileglob', playbook_dir + '/../secrets/vault.local.yml', errors='ignore', wantlist=True) | length > 0
|
||||
when: >-
|
||||
lookup('ansible.builtin.fileglob', playbook_dir + '/../secrets/vault.local.yml',
|
||||
errors='ignore', wantlist=True) | length > 0
|
||||
|
||||
roles:
|
||||
- dotfiles_common
|
||||
|
||||
- hosts: void
|
||||
- name: Configure Void platform
|
||||
hosts: platform_void
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- packages_void
|
||||
- services_runit
|
||||
|
||||
- name: Configure Void graphical desktop
|
||||
hosts: platform_void:&graphical_desktop
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_desktop_common
|
||||
- profile_desktop_sway
|
||||
- profile_desktop_hyprland
|
||||
@@ -30,7 +42,52 @@
|
||||
- profile_desktop_xfce
|
||||
- profile_desktop_host
|
||||
|
||||
- hosts: workstation_dev_fedora
|
||||
- name: Configure Linux Mint platform
|
||||
hosts: platform_mint
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- packages_mint
|
||||
- services_systemd
|
||||
|
||||
- name: Configure personal workstation role on Linux Mint
|
||||
hosts: platform_mint:&role_personal_workstation
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_personal_workstation
|
||||
|
||||
- name: Configure Cinnamon desktop on Linux Mint
|
||||
hosts: platform_mint:&desktop_cinnamon
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_desktop_cinnamon
|
||||
|
||||
- name: Configure FreeBSD platform
|
||||
hosts: platform_freebsd
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- packages_freebsd
|
||||
- services_freebsd
|
||||
|
||||
- name: Configure lab role on FreeBSD
|
||||
hosts: platform_freebsd:&role_lab
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_lab
|
||||
|
||||
- name: Configure Hyprland desktop on FreeBSD
|
||||
hosts: platform_freebsd:&desktop_hyprland
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_desktop_hyprland_freebsd
|
||||
|
||||
- name: Configure Fedora workstation development layer
|
||||
hosts: workstation_dev_fedora
|
||||
become: true
|
||||
|
||||
roles:
|
||||
@@ -38,13 +95,15 @@
|
||||
- services_systemd
|
||||
- profile_workstation_dev_common
|
||||
|
||||
- hosts: workstation_host_linux
|
||||
- name: Configure native Linux workstation host layer
|
||||
hosts: workstation_host_linux
|
||||
become: true
|
||||
|
||||
roles:
|
||||
- profile_workstation_gnome
|
||||
|
||||
- hosts: workstation_dev_wsl
|
||||
- name: Configure WSL workstation development layer
|
||||
hosts: workstation_dev_wsl
|
||||
become: true
|
||||
|
||||
roles:
|
||||
@@ -53,7 +112,8 @@
|
||||
- profile_workstation_dev_common
|
||||
- profile_workstation_dev_wsl
|
||||
|
||||
- hosts: ubuntu_server
|
||||
- name: Configure Ubuntu server
|
||||
hosts: ubuntu_server
|
||||
become: true
|
||||
|
||||
roles:
|
||||
|
||||
Reference in New Issue
Block a user