[DOC] DSOM Ansible Configuration Guide (Example Elastic SOC v1.0)
docs/ANSIBLE-CONFIG-GUIDE.md
"Orchestration for Uptime. Sovereignty for Intelligence."
🛠️ [TOOL] The Ansible Blueprint (ansible.cfg)
The ansible.cfg file is explicitly optimized for the DSOM Sovereign Fabric:
* Pipelining: Enabled to reduce SSH handshake latency across our distributed 16-node backbone.
* YAML Callback: Standardised for high-fidelity human/AI audit of deployment steps.
* Rootful Orchestration: Enabled via become: true at the task level for OS tuning (networking, dynamic kernel buffers, UFW rules, and topology mappings).
* Orchestrator User: Ansible connects natively via the dsom-admin identity using ed25519 keys.
* Remote Temp Resilience: Ansible is configured to seamlessly utilize /tmp with allow_world_readable_tmpfiles = True to bypass strict unprivileged execution limits during root escalations.
🛡️ [SHIELD] The Doctrine: "Rootful Orchestration, Rootless Execution"
In the Example Elastic SOC architecture, we enforce a strict hybrid privilege model to ensure production-grade performance with sovereign-grade security:
- Rootful Orchestration: Ansible runs tasks requiring kernel tuning (
sysctlmax map counts and dynamic TCP buffers) or firewall management (UFW) as root (become: yes). - Idempotent Mitigation: Ansible proactively checks for manual configuration drift (e.g. legacy sysctl limits) and safely comments them out via regex rather than blindly overwriting them.
- Rootless Execution: All containers and persistent services (Elasticsearch, Wazuh) will be strictly started as non-privileged sovereign users.
- Production Identity: Strictly enforced UID:GID 2001:2001 (
dsom-admin).
- Production Identity: Strictly enforced UID:GID 2001:2001 (
- Sovereign Topology: Inter-cluster DNS is guaranteed by injecting the hardcoded 16-node
/etc/hostsmapping natively via Ansibleblockinfile, surviving external DNS outages.
🌳 Example Elastic SOC Structure (16-Node Fabric)
.
├── ansible.cfg # Project performance tuning
├── playbooks/
│ └── site.yml # Master Orchestrator (Rootful Control)
├── inventory/
│ └── hosts.yml # 16-Node Backbone & IP Mapping
├── roles/
│ └── setup_os/ # Foundation: OS Hardening, Dynamic Buffers, UFW, Lynis 3.0.9+
├── .agents/
│ ├── brain/ # Sovereign AI Cognitive State (Palace)
│ └── skills/ # AI Agent Skills (Audit, Health, Backup)
│ ├── audit-node-security/
│ └── node-health-check/
└── tools/ # Operational Lifecycle Tools
├── sysadmin-vm-prep.sh # Dual-Stage VM Bootstrapper (Bash)
├── eod-palace.ps1 # End-of-Day GitOps Hibernation
└── sod-palace.ps1 # Start-of-Day AI Reanimation
🔐 [VAULT] Sovereign Secrets & Identity
- Registry:
vault/vpn_credentials.yml,vault/ssh_config_template.txt. - Identity (Production):
ansible_user: Set todsom-admin.ansible_become: Must betrueforsetup_ostasks.- UID:GID: Standardised at 2001:2001.
- Container Sovereignty:
keep-idprevents data directory ownership leaks to root during volume mounting. > [BRAIN] Logic: In rootless environments,keep-idensures the host UID exactly mirrors the container UID (2001->2001). This allows the Sovereign Architect to natively own the Elasticsearch and Wazuh NVMe data, enabling manual maintenance withoutsudo.
🌐 Example Elastic SOC Core Ports
| Port | Service | Role | Data Flow |
|---|---|---|---|
| 9200 | ES HTTPS | Persistence | External API / Wazuh Ingest |
| 9300 | ES Transport | Node-to-Node | Internal Cluster Traffic (Backbone) |
| 5601 | Kibana UI | Visualization | User Access / Dashboard |
| 1514/1515 | Wazuh | SIEM | Agent Registration & Events |
| 55000 | Wazuh API | Integration | API interactions |
| 8220 | Elastic Fleet | Management | Elastic Agent endpoint monitoring |
| 5044 | Logstash | Ingestion | Beats/Syslog pipeline ingestion |
| 22 | SSH | Orchestration | Ansible Control & T2 Bridging |
🚀 Deployment Sequence (The Sovereign Rhythm)
- Stage 1 - VM Injection: Execute
bash tools/sysadmin-vm-prep.sh <ip>from the Jumphost to standardise the OS base, standardise SSH keys, and inject thedsom-adminuser. - Stage 2 - Baseline Hardening: Ansible runs
roles/setup_osto install security tooling (Lynis, Auditd), deploy UFW rules, and dynamically inject RAM-awaresysctlbuffers for Elasticsearch. - Stage 3 - Autonomous Audit: AI runs the
node-health-checkandaudit-node-securityskills to guarantee the node hits a Lynis score of 70+ before proceeding. - Stage 4 - Persistence Fabric: Deploy Elasticsearch and Wazuh infrastructure (Pending Phase 3).
Maintained by the DSOM Engineering Team & AI Cognitive Twin | Example Elastic SOC v1.0
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-04 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0