I have a few VMs and PMs around the house that I’d setup over time and I’d now like to rebuild some, not to mention just simplify the whole lot.

How the hell do I get from a working system to an equivalent ansible playbook without many (MANY) iterations of trial & error - and potentially destroying the running system??

Ducking around didn’t really show much so I’m either missing a concept / keyword, or, no-one does this.

Pointers?

TIA

  • non_burglar@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    I went through this about 6 months ago.

    Just build playbooks from basic to specific. I did so in three parts:

    1. Container creation
    2. Basic settings common to all my hosts
    3. Specific service config & software

    Ansible assumes you have a hierarchy of roles to apply for each service, so layering playbooks this way should help