{"id":"ftl2-two-phase-host-registration","text":"FTL2 deployments use a two-phase host registration pattern: connect first as `root` to bootstrap an `admin` user, then re-register the same hostname with `ansible_user='admin'` and `ansible_become=True` for privileged operations.","truth_value":"IN","source":"entries/2026/05/11/deployments-catbeez-deploy-prod.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{"example":"# Phase 1: bootstrap as root\nftl.add_host(hostname=\"web01\", ansible_host=ip, ansible_user=\"root\")\nawait ftl[\"web01\"].user(name=\"admin\", groups=\"wheel\", create_home=True)\nawait ftl[\"web01\"].copy(content=sudoers, dest=\"/etc/sudoers.d/admin\")\n\n# Phase 2: re-register as admin with become\nftl.add_host(hostname=\"web01\", ansible_host=ip,\n             ansible_user=\"admin\", ansible_become=True)\nawait ftl[\"web01\"].copy(src=\"app.conf\", dest=\"/etc/app/config.yml\")"},"explanation":{"steps":[{"node":"ftl2-two-phase-host-registration","truth_value":"IN","reason":"premise"}]}}