All checks were successful
CI / skip-ci-check (push) Successful in 1m18s
CI / lint-and-test (push) Successful in 1m23s
CI / ansible-validation (push) Successful in 3m2s
CI / secret-scanning (push) Successful in 1m19s
CI / dependency-scan (push) Successful in 1m24s
CI / sast-scan (push) Successful in 2m32s
CI / license-check (push) Successful in 1m23s
CI / vault-check (push) Successful in 2m22s
CI / playbook-test (push) Successful in 2m25s
CI / container-scan (push) Successful in 1m51s
CI / sonar-analysis (push) Successful in 2m32s
CI / workflow-summary (push) Successful in 1m17s
### Summary
This PR refactors the playbook layout to reduce duplication and make host intent clearer (servers vs workstations), splits monitoring by host type, and restores full Zsh setup for developers while keeping servers aliases-only.
### Key changes
- **New playbooks**
- `playbooks/servers.yml`: baseline for server-class hosts (no desktop apps)
- `playbooks/workstations.yml`: baseline for dev/desktop/local + **desktop apps only on `desktop` group**
- **Monitoring split**
- `roles/monitoring_server`: server monitoring + intrusion prevention (includes `fail2ban`, sysstat)
- `roles/monitoring_desktop`: desktop-oriented monitoring tooling
- Updated playbooks to use the correct monitoring role per host type
- **Shell role: server-safe + developer-friendly**
- `roles/shell` now supports two modes:
- `shell_mode: minimal` (default): aliases-only, does not overwrite `.zshrc`
- `shell_mode: full`: installs Oh My Zsh + Powerlevel10k + plugins and deploys a managed `.zshrc`
- `playbooks/development.yml` and `playbooks/workstations.yml` use `shell_mode: full`
- `playbooks/servers.yml` remains **aliases-only**
- **Applications**
- Applications role runs only on `desktop` group (via `workstations.yml`)
- Removed Brave installs/repo management
- Added **CopyQ** to desktop apps (`applications_desktop_packages`)
- **Docs + architecture**
- Added canonical doc tree under `project-docs/` (overview/architecture/standards/workflow/decisions)
- Consolidated architecture docs: `docs/reference/architecture.md` is now a pointer to `project-docs/architecture.md`
- Fixed broken doc links by adding the missing referenced pages under `docs/`
### Behavior changes (important)
- Desktop GUI apps install **only** on the `desktop` inventory group (not on servers, not on dev VMs unless they are in `desktop`).
- Dev/workstation Zsh is now provisioned in **full mode** (managed `.zshrc` + p10k).
### How to test (local CI parity)
```bash
make test
npm test
```
Optional dry runs (interactive sudo may be required):
```bash
make check
make check-local
```
### Rollout guidance
- Apply to a single host first:
- Workstations: `make workstations HOST=<devhost>`
- Servers: `make servers HOST=<serverhost>`
- Then expand to group runs.
Reviewed-on: #4
57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
---
|
|
# Shell role defaults
|
|
|
|
# List of users to configure zsh for
|
|
# By default, only configure the ansible user
|
|
# Override in host_vars to add more users
|
|
shell_users:
|
|
- "{{ ansible_user | default(ansible_user_id) }}"
|
|
|
|
# Additional users to configure (appended to shell_users)
|
|
# Use this to add users WITHOUT having to repeat ansible_user
|
|
# Example in host_vars:
|
|
# shell_additional_users:
|
|
# - beast
|
|
# - ladmin
|
|
shell_additional_users: []
|
|
|
|
# Shell configuration mode:
|
|
# - minimal: aliases-only (safe for servers; does not overwrite ~/.zshrc)
|
|
# - full: install oh-my-zsh + powerlevel10k + plugins and deploy managed ~/.zshrc
|
|
shell_mode: minimal
|
|
|
|
# Packages installed for all modes.
|
|
shell_packages_common:
|
|
- zsh
|
|
- tmux
|
|
- fzf
|
|
|
|
# Extra packages for full mode.
|
|
shell_packages_full_extra:
|
|
- git
|
|
|
|
# Effective package list.
|
|
shell_packages: "{{ shell_packages_common + (shell_packages_full_extra if shell_mode == 'full' else []) }}"
|
|
|
|
# If true, change users' login shell to zsh.
|
|
shell_set_default_shell: false
|
|
|
|
# Path (relative to the user's home) for the managed aliases file.
|
|
shell_aliases_filename: ".zsh_aliases_ansible"
|
|
|
|
# Line added to ~/.zshrc to source the managed aliases file.
|
|
shell_zshrc_source_line: '[ -f "$HOME/{{ shell_aliases_filename }}" ] && source "$HOME/{{ shell_aliases_filename }}"'
|
|
|
|
# Full mode settings
|
|
shell_install_oh_my_zsh: "{{ shell_mode == 'full' }}"
|
|
shell_install_powerlevel10k: "{{ shell_mode == 'full' }}"
|
|
shell_install_plugins: "{{ shell_mode == 'full' }}"
|
|
shell_deploy_managed_zshrc: "{{ shell_mode == 'full' }}"
|
|
|
|
# Zsh plugins cloned into oh-my-zsh custom plugins (full mode only).
|
|
zsh_plugins:
|
|
- name: "zsh-syntax-highlighting"
|
|
repo: "https://github.com/zsh-users/zsh-syntax-highlighting.git"
|
|
- name: "zsh-autosuggestions"
|
|
repo: "https://github.com/zsh-users/zsh-autosuggestions.git"
|