Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
31–40 of 57 posts
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#32 uv tool run enroll single-shot --harvest ./harvest --out ./ansible
It generated almost a thousand roles, and at quick glance it identified many changes which I expected and some that I didn't.Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#33That's a really cute looking tool. I ran it without installing via: uv tool run enroll single-shot --harvest ./harvest --out ./ansible It generated almost a thousand roles, and at quick glance it identified many changes which I expected and some that I didn't.
There is the --exclude option which might help (also keep in mind you can define an enroll.ini file to manage the flags so it's less cumbersome). Otherwise, you can always prune the roles from the ansible dir/playbook.
I'm going to continue to work on easy options to skip stuff. In particular I do think many of the 'lib' packages could be omitted if they are just dependencies of other packages already detected as part of the harvest. (Need to basically build a dependency graph)
Thanks for trying it out!
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#34The reason I'm asking is because I'm interested in how much confidence could be lent to this tool with regards to more old and obscure machines that have been running for years.
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#35That's a really cute looking tool. I ran it without installing via: uv tool run enroll single-shot --harvest ./harvest --out ./ansible It generated almost a thousand roles, and at quick glance it identified many changes which I expected and some that I didn't.
Yup - it can be pretty overwhelming, it depends on what it detected on your system! The state.json will usually explain why it 'harvested' something (perhaps it was because it found a running systemd service, perhaps it was due to detecting a package having been manually installed, etc) There is the --exclude option which might help (also keep in mind you can define an enroll.ini file to manage the flags so it's less…
What I mean is in some large companies you are given a host that already has lots of config changes, possibly by ansible. Then your team has to configure on top of those changes, maybe ansible again. I'd like to run on the baseline system given to create a baseline, then on a production host to see how it drifted.
Sorry if this is in the docs, cool tool!
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#36I wonder if Nix has similar tools, as it is famous for declarative system management, which is quite suitable for server provisioning.
A system that has neither a store nor the config (container image) not easily reconstructable as you miss too much metadata.
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#37Could it also detect changed package files; if there are per-package-file checksums like with `debsums` and `rpm -V`? Does it check extended filesystem labels with e.g. getfacl for SELinux support? I've also done this more than a few times and not written a tool. At least once I've scripted better then regex to convert a configuration file to a Jinja2 templated configuration file (from the current package's default c…
Hi westurner! > Could it also detect changed package files; if there are per-package-file checksums like with debsums and `rpm -V`? Yes, that's exactly what it does. See https://git.mig5.net/mig5/enroll/src/branch/main/enroll/plat... and https://git.mig5.net/mig5/enroll/src/branch/main/enroll/rpm.... It also tries to ignore packages that came with the distro automatically, e.g focusing on stuff that was explicitly in…
Does it already indirectly diff the output of `systemd-analyze security`?
Would there be value to it knowing the precedence order of systemd config files? (`man systemd.unit`)
How to transform the generated playbooks to - instead of ansible builtins - use a role from ansible-galaxy to create users for example?
How to generate tests or stub tests (or a HEALTHCHECK command/script, or k8s Liveness/Readiness/Startup probes, and/or a Nagios or a Prometheus monitoring config,) given ansible inventory and/or just enroll?
Ansible Molecule used to default to pytest-testinfra for the verify step but the docs now mention an ansible-native way that works with normal inventory that can presumably still run testinfra tests as a verify step. https://docs.ansible.com/projects/molecule/configuration/?h=...
MacOS: honebrew_tap_module, homebrew_module, homebrew_cask_module, osx_defaults_module
Conda (Win/Mac/Lin, AMD64, ARM64, PPC64, RISC-V 64 (*), WASM)
CycloneDX/cyclonedx-python generates SBOMs from venv, conda, pip requirements.txt, pipenv, poetry, pdm, uv: https://github.com/CycloneDX/cyclonedx-python
Container config: /var, $DOCKER_HOST, Podman, Docker, $KUBECONFIG defaults to ~/.kube/config (kube config view), Podman rootless containers
Re: vm live migration, memory forensics, and diff'ing whole servers:
Live migration and replication solutions already have tested bit-level ~diffing that would also be useful to compare total machine state between 2 or more instances. At >2 nodes, what's anomalous? And how and why do the costs of convergence-based configuration management differ from golden image -based configuration management?
E.g. vmdiff diffs VMs. The README says it only diffs RAM on Windows. E.g. AVML and linpmem and volatility3 work with Linux.
/? volatility avml inurl:awesome https://www.google.com/search?q=volatiloty+avml+inurl%3Aawes...
Re: Show HN: Enroll, a tool to reverse-engineer servers into Ansible config mgmt
#38Is it expected that it does not allocate a TTY for sudo password prompts when connecting to a remote machine via SSH? How would I use it otherwise?