Enroll inspects Debian-like and RedHat-like machines, writes a harvest bundle (state.json plus artifacts), then renders Ansible roles and playbooks from that snapshot.
$ enroll harvest --out ./harvest
$ enroll validate ./harvest
$ enroll manifest --harvest ./harvest --out ./ansible
$ cd ./ansible
$ ansible-galaxy collection install -r requirements.yml
$ ansible-playbook -i localhost, -c local playbook.yml --check --diff
Enroll is a migration and recovery helper. It gives you a generated Ansible starting point from a machine that already exists; it does not prove that the machine is well designed, compliant, or safe to replicate.
The public CLI renders Ansible. The codebase has an internal renderer-neutral model, but the documented user-facing manifest output is Ansible roles, playbooks, inventory, variables, files, templates, handlers, and a generated README.md.
state.json, the vendored JSON schema, referenced artifacts, and orphaned files before rendering or CI use.--fqdn for inventory-driven multi-host output.Choose the shape that matches the job: one host, remote harvest, or a shared multi-host Ansible tree.
enroll harvest --out ./harvest
enroll manifest --harvest ./harvest --out ./ansible
cd ./ansible
ansible-playbook -i localhost, -c local playbook.yml --check --diffenroll harvest --remote-host app01.example.net --remote-user mig --out ./harvest
# Use -K / --ask-become-pass when remote sudo needs a password.
enroll manifest --harvest ./harvest --out ./ansiblehost=app01.example.net
enroll single-shot --remote-host "$host" --remote-user mig \
--harvest "./harvest-$host" --out ./ansible-site --fqdn "$host"
cd ./ansible-site
ansible-playbook -i inventory/hosts.ini "playbooks/${host}.yml" --check --diffenroll diff --old ./harvest-golden --new ./harvest-current \
--format markdown --ignore-package-versions --exclude-path /var/anacronWithout --fqdn, Enroll renders self-contained roles where role files live under roles/<role>/files and variables live in defaults/main.yml.
--fqdnWith --fqdn, shared role tasks stay reusable while host-specific files and variables live under inventory/host_vars/<fqdn>. --fqdn implies one-role-per-package/unit behavior.
Directory harvests are frozen into private temp copies before use, artifact paths are no-follow validated, and harvested Jinja-looking values are emitted as Ansible !unsafe data.