Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
igalic opened this issue Feb 9, 2019 · 3 comments
Closed

Comments

@igalic
Copy link
Collaborator

igalic commented Feb 9, 2019

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
Copy link
Collaborator Author

igalic commented Feb 9, 2019

unless this is already possible in the API, this issue depends on bsdci/ioc#18

@igalic
Copy link
Collaborator Author

igalic commented Feb 9, 2019

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

def __iter__(self) -> typing.Iterator[str]:
"""Return the flattened dict iterator."""
for key in dict.__iter__(self):
value = dict.__getitem__(self, key)
if isinstance(value, Data) is True:
for subkey in value.__iter__():
yield f"{key}.{subkey}"
else:
yield key

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

@igalic
Copy link
Collaborator Author

igalic commented Feb 9, 2019

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 ;)

@igalic igalic closed this as completed Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant