ftl2-host-reregistration-for-bootstrap

Status: IN

During initial provisioning, a host can be registered first as `root` for user creation, then re-registered as a non-root user with `ansible_become=True` to bootstrap sudo access.

Source: entries/2026/05/11/deployments-servercraft-web-deploy.md

Example

# Initial connect as root to create admin user
ftl.add_host(hostname="myhost", ansible_host=ip, ansible_user="root")
await ftl["myhost"].user(name="admin", groups="wheel", create_home=True)

# Re-register same hostname as admin with sudo
ftl.add_host(hostname="myhost", ansible_host=ip,
             ansible_user="admin", ansible_become=True)

JSON