Generate declarative configuration of QubesOS

Does anybody have a project for generating salt or ansible configuration of the current state of Qubes OS system?

3 Likes

I don’t think that’s what @otter2 is looking for… You want to do some kind of “backup” using salt? (something like this? Backup/restore qube metadata?)

1 Like

Unless I am mistaken I don’t think it can look at my qube and spit out ansible definition…

Not just that, something like this can be useful for making definitions of stray qubes you have decided you want to keep for good. Or if you’re a newb, started learning salt and just realized that you have like 40 qubes you now need to write definitions for.

For example, say we have an AppVM. Just by knowing what the system defaults are, and what qube preferences are, it can already tell that, for example, memory and virt_mode are set to custom values, and it prints:

my-app-qube:
  qvm.vm:
    - name: my-app-qube
    - present:
      - label: green
      - template: debian-13-xfce
      - class: AppVM
    - prefs:
      - label: green
      - template: debian-13-xfce
      - memory: 1000
      - virt_mode: hvm
4 Likes