Forum: Cfengine Help (Mailing list)
Subject: Re: Generating Host Profiles Using CFengine3
Author: eystein
Link to topic: https://cfengine.com/forum/read.php?3,7837,7840#msg-7840

Hi again,

I see what you are looking for, but I think you might underestimate the 
complexity of doing this, at least generically.

Cfengine would need to distinguish the relevant information from the irrelevant 
when building these templates in order to avoid the need for a complete clone 
of the hard drive.
Now remember that FreeBSD works differently than Linux which again works 
differently than Windows.
Furthermore, relevant things change from version to version of the operating 
systems.
People would also define relevance differently - some people care about 
installed software, others about interface configuration, etc.
Therefore, I think creating these baseline templates automatically would 
require a lot of domain knowledge, and is thus not supported out-of-the-box by 
Cfengine.

If you still would like to pursue the idea, perhaps the packages-promises is 
the right place to start.
Assuming all software is installed though FreeBSD packages, you can use a 
commands-promise to dump pkg_info to a file, then read the file as a list in 
Cfengine, and then use a packages-promise with policy "add" to make sure all 
this software is installed.
This assumes that you have the necessary packages available.. otherwise you 
would need a list of all files included in all packages, and do binary copies 
from the "master", where things starts to get messy...
I don't know FreeBSD too well, but there is a list of installed package files 
in /etc somewhere I think...

In short, don't expect this to be very easy..
The best would of course be to get the specifications by other means than a 
configured machine, but I guess you have already thought of that. :)

---
Regards, 
Eystein

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to