๐ Bootstrap TrueNAS for Ansible
Prepare an already-installed TrueNAS 25.10+ system for configure_truenas.yml. This is not an operating-system installation or storage-pool provisioning procedure. See the TrueNAS Role Contributor Guide.
๐ Prerequisites
- Record the NAS address, supported version, DNS/time requirements, administrator recovery access, and approved SSH source networks.
- Complete initial local administrator setup in the UI; the role requires this before configuration.
- Prepare the controllerโs repository Ansible environment and vault access. Never store plaintext credentials in inventory or command history.
๐ Procedure to Complete
- Document how to enable SSH and create or prepare the inventory connection account using the installed TrueNAS UI.
- Install and verify the controllerโs public key and the NAS host-key fingerprint through a trusted channel.
- Grant only the approved privilege needed to become root for local middleware access, without locking out the current administrator.
- Update the inventory and host variables, preserving the existing naming and encrypted secret conventions.
- Validate preflight before selecting individual configuration stages; do not immediately run all configured stages.
๐ Initial Validation
Run from the repository root after connection preparation:
ansible-inventory -i inventory/truenas/inventory.ini --graph
ansible-playbook -i inventory/truenas/inventory.ini playbooks/truenas/configure_truenas.yml --limit truenas-01 --syntax-check --ask-vault-pass
ansible-playbook -i inventory/truenas/inventory.ini playbooks/truenas/configure_truenas.yml --limit truenas-01 --tags truenas_preflight --ask-vault-pass
The final command connects to the NAS and performs read-only readiness, version, and administrator checks. Add -k for an SSH password or -K for a become password when required; neither is the vault password. The role uses local middleware over SSH, not a web UI password or HTTP API key.
โ Verification and Recovery
- Verify key-based SSH, approved root escalation, successful preflight, and a separate working administrator session.
- Document how to recover access from the console if SSH, keys, sudo, or network settings are wrong.
- Continue with Add Local Users and Add Shares using targeted tags.