24 Commits

Author SHA1 Message Date
c3e6caf9e8 refactor-servers-workstations-shell-monitoring (#4)
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
2026-01-01 22:11:24 -05:00
69a39e5e5b Add POTE app project support and improve IP conflict detection (#3)
## Summary

This PR adds comprehensive support for deploying the **POTE** application project via Ansible, along with improvements to IP conflict detection and a new app stack provisioning system for Proxmox-managed LXC containers.

## Key Features

### 🆕 New Roles
- **`roles/pote`**: Python/venv deployment role for POTE (PostgreSQL, cron jobs, Alembic migrations)
- **`roles/app_setup`**: Generic app deployment role (Node.js/systemd)
- **`roles/base_os`**: Base OS hardening role

### 🛡️ Safety Improvements
- IP uniqueness validation within projects
- Proxmox-side IP conflict detection
- Enhanced error messages for IP conflicts

### 📦 New Playbooks
- `playbooks/app/site.yml`: End-to-end app stack deployment
- `playbooks/app/provision_vms.yml`: Proxmox guest provisioning
- `playbooks/app/configure_app.yml`: OS + application configuration

## Security
-  All secrets stored in encrypted vault.yml
-  Deploy keys excluded via .gitignore
-  No plaintext secrets committed

## Testing
-  POTE successfully deployed to dev/qa/prod environments
-  All components validated (Git, PostgreSQL, cron, migrations)

Co-authored-by: ilia <ilia@levkin.ca>
Reviewed-on: #3
2026-01-01 11:19:54 -05:00
e897b1a027 Fix: Resolve linting errors and improve firewall configuration (#2)
Some checks failed
CI / lint-and-test (push) Successful in 1m16s
CI / ansible-validation (push) Successful in 5m49s
CI / secret-scanning (push) Successful in 1m33s
CI / dependency-scan (push) Successful in 2m48s
CI / sast-scan (push) Successful in 5m46s
CI / license-check (push) Successful in 1m11s
CI / vault-check (push) Failing after 5m25s
CI / playbook-test (push) Successful in 5m32s
CI / container-scan (push) Successful in 4m32s
CI / sonar-analysis (push) Successful in 6m53s
CI / workflow-summary (push) Successful in 1m6s
- Fix UFW firewall to allow outbound traffic (was blocking all outbound)
- Add HOST parameter support to shell Makefile target
- Fix all ansible-lint errors (trailing spaces, missing newlines, document starts)
- Add changed_when: false to check commands
- Fix variable naming (vault_devGPU -> vault_devgpu)
- Update .ansible-lint config to exclude .gitea/ and allow strategy: free
- Fix NodeSource repository GPG key handling in shell playbook
- Add missing document starts to host_vars files
- Clean up empty lines in datascience role files

Reviewed-on: #2
2025-12-25 16:47:26 -05:00
ilia
c017ec6941 Fix: Update CI workflow to install a fixed version of Trivy for improved reliability and error handling during installation
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m2s
CI / ansible-validation (pull_request) Successful in 3m6s
CI / secret-scanning (pull_request) Successful in 56s
CI / dependency-scan (pull_request) Successful in 1m0s
CI / sast-scan (pull_request) Successful in 2m13s
CI / license-check (pull_request) Successful in 57s
CI / vault-check (pull_request) Successful in 2m8s
CI / playbook-test (pull_request) Successful in 2m2s
CI / container-scan (pull_request) Successful in 1m26s
CI / sonar-analysis (pull_request) Successful in 2m3s
CI / workflow-summary (pull_request) Successful in 52s
2025-12-15 15:50:04 -05:00
ilia
9e7ef8159b Fix: Update CI workflow to disable SCM in SonarScanner configuration for improved analysis accuracy
Some checks failed
CI / lint-and-test (pull_request) Successful in 57s
CI / ansible-validation (pull_request) Successful in 2m20s
CI / secret-scanning (pull_request) Successful in 54s
CI / dependency-scan (pull_request) Successful in 59s
CI / sast-scan (pull_request) Successful in 2m26s
CI / license-check (pull_request) Successful in 57s
CI / vault-check (pull_request) Successful in 2m34s
CI / playbook-test (pull_request) Successful in 2m37s
CI / container-scan (pull_request) Failing after 1m42s
CI / sonar-analysis (pull_request) Successful in 2m18s
CI / workflow-summary (pull_request) Successful in 52s
2025-12-15 15:36:15 -05:00
ilia
3828e04b13 Fix: Update CI workflow to install Git alongside Node.js and enhance SonarScanner installation process with improved error handling
All checks were successful
CI / lint-and-test (pull_request) Successful in 59s
CI / ansible-validation (pull_request) Successful in 3m32s
CI / secret-scanning (pull_request) Successful in 56s
CI / dependency-scan (pull_request) Successful in 1m3s
CI / sast-scan (pull_request) Successful in 2m54s
CI / license-check (pull_request) Successful in 59s
CI / vault-check (pull_request) Successful in 2m43s
CI / playbook-test (pull_request) Successful in 3m7s
CI / container-scan (pull_request) Successful in 1m54s
CI / sonar-analysis (pull_request) Successful in 2m5s
CI / workflow-summary (pull_request) Successful in 52s
2025-12-15 15:11:36 -05:00
ilia
d6655babd9 Refactor: Simplify connectivity analysis logic by breaking down into smaller helper functions for improved readability and maintainability
All checks were successful
CI / lint-and-test (pull_request) Successful in 1m0s
CI / ansible-validation (pull_request) Successful in 2m12s
CI / secret-scanning (pull_request) Successful in 54s
CI / dependency-scan (pull_request) Successful in 58s
CI / sast-scan (pull_request) Successful in 2m58s
CI / license-check (pull_request) Successful in 59s
CI / vault-check (pull_request) Successful in 2m50s
CI / playbook-test (pull_request) Successful in 2m42s
CI / container-scan (pull_request) Successful in 1m44s
CI / sonar-analysis (pull_request) Successful in 2m12s
CI / workflow-summary (pull_request) Successful in 51s
2025-12-15 14:55:10 -05:00
ilia
dc94395bbc Fix: Enhance SonarScanner error handling in CI workflow with detailed failure messages and troubleshooting guidance
All checks were successful
CI / lint-and-test (pull_request) Successful in 57s
CI / ansible-validation (pull_request) Successful in 2m20s
CI / secret-scanning (pull_request) Successful in 53s
CI / dependency-scan (pull_request) Successful in 58s
CI / sast-scan (pull_request) Successful in 2m14s
CI / license-check (pull_request) Successful in 55s
CI / vault-check (pull_request) Successful in 2m9s
CI / playbook-test (pull_request) Successful in 2m4s
CI / container-scan (pull_request) Successful in 1m27s
CI / sonar-analysis (pull_request) Successful in 2m5s
CI / workflow-summary (pull_request) Successful in 51s
2025-12-14 21:35:52 -05:00
ilia
699aaefac3 Fix: Update CI workflow to improve SonarScanner installation process with enhanced error handling and version management
All checks were successful
CI / lint-and-test (pull_request) Successful in 57s
CI / ansible-validation (pull_request) Successful in 2m16s
CI / secret-scanning (pull_request) Successful in 53s
CI / dependency-scan (pull_request) Successful in 57s
CI / sast-scan (pull_request) Successful in 2m5s
CI / license-check (pull_request) Successful in 54s
CI / vault-check (pull_request) Successful in 1m53s
CI / playbook-test (pull_request) Successful in 2m20s
CI / container-scan (pull_request) Successful in 1m35s
CI / sonar-analysis (pull_request) Successful in 2m16s
CI / workflow-summary (pull_request) Successful in 51s
2025-12-14 21:21:26 -05:00
ilia
83a5d988af Fix: Update ansible-lint configuration to exclude specific paths and skip certain rules for improved linting flexibility
Some checks failed
CI / lint-and-test (pull_request) Successful in 58s
CI / ansible-validation (pull_request) Successful in 2m17s
CI / secret-scanning (pull_request) Successful in 53s
CI / dependency-scan (pull_request) Successful in 57s
CI / sast-scan (pull_request) Successful in 2m17s
CI / license-check (pull_request) Successful in 55s
CI / vault-check (pull_request) Successful in 2m20s
CI / playbook-test (pull_request) Successful in 2m16s
CI / container-scan (pull_request) Successful in 1m25s
CI / sonar-analysis (pull_request) Failing after 1m56s
CI / workflow-summary (pull_request) Successful in 50s
2025-12-14 21:04:45 -05:00
ilia
a45ee496e4 Fix: Update CI workflow to use Ubuntu 22.04 container, install Node.js and SonarScanner with improved methods, and enhance SonarQube connectivity verification
Some checks failed
CI / lint-and-test (pull_request) Successful in 57s
CI / ansible-validation (pull_request) Successful in 2m6s
CI / secret-scanning (pull_request) Successful in 53s
CI / dependency-scan (pull_request) Successful in 57s
CI / sast-scan (pull_request) Successful in 1m55s
CI / license-check (pull_request) Successful in 54s
CI / vault-check (pull_request) Successful in 1m58s
CI / playbook-test (pull_request) Successful in 1m58s
CI / container-scan (pull_request) Successful in 1m31s
CI / sonar-analysis (pull_request) Failing after 2m36s
CI / workflow-summary (pull_request) Successful in 50s
2025-12-14 20:51:36 -05:00
ilia
e54ecfefc1 Fix: Update CI workflow to enhance playbook syntax checking and improve SonarQube connectivity verification
Some checks failed
CI / lint-and-test (pull_request) Successful in 58s
CI / ansible-validation (pull_request) Successful in 2m15s
CI / secret-scanning (pull_request) Successful in 54s
CI / dependency-scan (pull_request) Successful in 58s
CI / sast-scan (pull_request) Successful in 2m11s
CI / license-check (pull_request) Successful in 54s
CI / vault-check (pull_request) Successful in 1m54s
CI / playbook-test (pull_request) Successful in 1m52s
CI / container-scan (pull_request) Successful in 1m27s
CI / sonar-analysis (pull_request) Failing after 50s
CI / workflow-summary (pull_request) Successful in 50s
2025-12-14 20:43:28 -05:00
ilia
f20b671e76 Fix: Update CI workflow to use Alpine-based images, install Node.js and Trivy with improved methods, and enhance dependency scanning steps
Some checks failed
CI / lint-and-test (pull_request) Successful in 56s
CI / ansible-validation (pull_request) Successful in 2m19s
CI / secret-scanning (pull_request) Successful in 55s
CI / dependency-scan (pull_request) Successful in 1m0s
CI / sast-scan (pull_request) Successful in 2m7s
CI / license-check (pull_request) Successful in 54s
CI / vault-check (pull_request) Successful in 2m0s
CI / playbook-test (pull_request) Successful in 1m58s
CI / container-scan (pull_request) Successful in 1m32s
CI / sonar-analysis (pull_request) Failing after 50s
CI / workflow-summary (pull_request) Successful in 50s
2025-12-14 20:28:06 -05:00
ilia
d0699d0b7a Fix: Add SonarQube analysis to CI workflow and update host inventory for production environment
Some checks failed
CI / lint-and-test (push) Successful in 57s
CI / ansible-validation (push) Successful in 2m26s
CI / secret-scanning (push) Successful in 1m27s
CI / dependency-scan (push) Successful in 1m32s
CI / sast-scan (push) Successful in 2m6s
CI / license-check (push) Successful in 54s
CI / vault-check (push) Successful in 2m27s
CI / playbook-test (push) Successful in 2m23s
CI / container-scan (push) Successful in 1m33s
CI / sonar-analysis (push) Failing after 1m6s
CI / workflow-summary (push) Successful in 51s
2025-12-14 20:10:38 -05:00
ilia
d4ce0a247d Fix: Remove artifact upload, update Trivy flags, add workflow summary, and add git to shell role
All checks were successful
CI / lint-and-test (push) Successful in 57s
CI / ansible-validation (push) Successful in 2m12s
CI / secret-scanning (push) Successful in 1m24s
CI / dependency-scan (push) Successful in 1m29s
CI / sast-scan (push) Successful in 1m53s
CI / license-check (push) Successful in 52s
CI / vault-check (push) Successful in 1m50s
CI / playbook-test (push) Successful in 1m53s
CI / container-scan (push) Successful in 1m23s
CI / workflow-summary (push) Successful in 1m14s
2025-12-14 14:57:22 -05:00
ilia
0076155ef1 Fix: Improve Trivy installation with multiple fallback methods and better error handling
Some checks failed
CI / lint-and-test (push) Successful in 56s
CI / ansible-validation (push) Successful in 2m19s
CI / secret-scanning (push) Successful in 1m28s
CI / dependency-scan (push) Failing after 1m30s
CI / sast-scan (push) Successful in 2m28s
CI / license-check (push) Successful in 53s
CI / vault-check (push) Successful in 1m53s
CI / playbook-test (push) Successful in 1m57s
CI / container-scan (push) Successful in 1m24s
2025-12-14 09:06:53 -05:00
ilia
67a9b3ca2b Fix: Check vault encryption header instead of decrypting files
Some checks failed
CI / lint-and-test (push) Successful in 54s
CI / ansible-validation (push) Successful in 2m20s
CI / secret-scanning (push) Successful in 1m26s
CI / dependency-scan (push) Failing after 1m21s
CI / sast-scan (push) Successful in 2m4s
CI / license-check (push) Successful in 53s
CI / vault-check (push) Successful in 2m0s
CI / playbook-test (push) Successful in 1m56s
CI / container-scan (push) Failing after 1m13s
2025-12-13 23:42:06 -05:00
ilia
6d14cf9253 Fix: Install git for Gitleaks and use direct Trivy binary download
Some checks failed
CI / lint-and-test (push) Successful in 55s
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / license-check (push) Has been cancelled
CI / vault-check (push) Has been cancelled
CI / playbook-test (push) Has been cancelled
CI / container-scan (push) Has been cancelled
CI / ansible-validation (push) Has been cancelled
2025-12-13 23:37:38 -05:00
ilia
a9ed19c9d2 Fix: Install Node.js in all Ubuntu containers for checkout action
Some checks failed
CI / lint-and-test (push) Successful in 58s
CI / ansible-validation (push) Successful in 3m13s
CI / secret-scanning (push) Failing after 1m21s
CI / dependency-scan (push) Failing after 1m20s
CI / sast-scan (push) Successful in 2m25s
CI / license-check (push) Successful in 55s
CI / vault-check (push) Failing after 2m44s
CI / playbook-test (push) Successful in 2m28s
CI / container-scan (push) Failing after 1m24s
2025-12-13 23:30:42 -05:00
ilia
1a565cc30e Fix: Change all jobs to use ubuntu-latest label to match runner
Some checks failed
CI / lint-and-test (push) Successful in 58s
CI / ansible-validation (push) Failing after 54s
CI / secret-scanning (push) Failing after 47s
CI / dependency-scan (push) Failing after 1m5s
CI / sast-scan (push) Failing after 1m11s
CI / license-check (push) Successful in 56s
CI / vault-check (push) Failing after 49s
CI / playbook-test (push) Failing after 49s
CI / container-scan (push) Failing after 50s
2025-12-13 23:24:02 -05:00
ilia
8818de005f Add comprehensive security scanning: SAST, license check, vault validation, playbook testing, and artifact uploads
Some checks failed
CI / lint-and-test (push) Successful in 1m0s
CI / ansible-validation (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / license-check (push) Has been cancelled
CI / vault-check (push) Has been cancelled
CI / playbook-test (push) Has been cancelled
CI / container-scan (push) Has been cancelled
2025-12-13 23:19:10 -05:00
ilia
990f886f02 Fix CI workflow: configure markdownlint, fix Node version, add Ansible validation
Some checks failed
CI / lint-and-test (push) Successful in 59s
CI / ansible-validation (push) Has been cancelled
2025-12-13 23:13:40 -05:00
ilia
f3b34f3c95 Fix CI workflow: configure markdownlint and make link checking non-blocking
Some checks failed
CI / lint-and-test (push) Successful in 59s
CI / build-and-test (push) Has been cancelled
2025-12-13 23:06:26 -05:00
ilia
ba7d4eb5b3 Add CI workflow with markdown linting and self-hosted runner job
Some checks failed
CI / lint-and-test (push) Failing after 1m17s
CI / build-and-test (push) Has been cancelled
2025-12-13 23:00:58 -05:00