Comment on Ansible Playbook - How do I reverse engineer a running system?

bushvin@lemmy.world ⁨5⁩ ⁨days⁩ ago

I would copy the existing system onto a new system:

  1. Update system to the latest packages
  2. Create a new base system using the same distro
  3. Check which packages are not on the new system, add them to your playbook
  4. Install packages on new system
  5. This will take some time. Run a find of all files and pass them to md5sum or sha512sum to get a list of files with their checksum. Compare the list from the old system to the new system.
  6. Update your playbook with these findings. Template is probably the way to go, Lineinfile might be good as well, use copy if nothimg else works.
  7. Check firewall settings and update your playbook.

Anyhow this will take some iterations, but while you have a copy of your ‘production’ system, you can test on your ‘test’ machine until you have the same functionality.

source
Sort:hotnewtop