bsdci / libioc

A Python library to manage jails with ioc{age,ell}
https://bsd.ci/libioc
Other
38 stars 11 forks source link

Provisioning plugins should have a method of setting jail specific "facts" #650

Closed igalic closed 5 years ago

igalic commented 5 years ago

I propose a new entry to the provision config space: a dict of facts.

the name is up for discussion, since every configuration management software names them differently:

i could go on, but these are the systems i have at least passing familiarity with.

Each of them also has a concept of a "custom fact". These are most often used to classify the system, e.g.: assign a specific role.

igalic commented 5 years ago

unless this is already possible in the API, this issue depends on https://github.com/bsdci/ioc/issues/18

igalic commented 5 years ago

libioc.Config.Data.Data.__iter__() only returns the flat structure:

https://github.com/bsdci/libioc/blob/5f869c1755110cbb54933259151a326135207733/libioc/Config/Data.py#L162-L170

which might make it tricky to get an entire dict from it…

igalic commented 5 years ago

I've solved this with a bit of example code in our bsdci/puppet-control-repo and documentation


n.b.: I'm using that exact example code ;)