(oops, sent from the wrong email address... sorry if this duplicates)
Hello all, I've been a long time cfengine2 user and I'm trying to get my
head wrapped around cfengine3. But I'm having difficulties trying to
get the organization I want, so I'm hoping someone here can point me in
the right direction.
What I previously did in my control: section of cfagent.conf was to
create classes for services based on system identifiers...
For example,
control:
server1::
AddClasses = ( IsServer )
AddClasses = ( DoServerBackup )
AddClasses = ( IsNISServer )
AddClasses = ( IsProxyServer )
AddClasses = ( IsSVNServer )
AddClasses = ( IsTimeServer )
server2::
AddClasses = ( IsServer )
AddClasses = ( IsTimeServer )
(!IsServer)::
AddClasses = ( IsWorkstation )
Then in my imports section I'd load the relevant configuration depending
on the service that was active:
import:
any::
all.d/profile.conf
all.d/yum.conf
all.d/vim.conf
# configs specific to server1
server1:
server1/web.conf
# Server configs by service
IsSVNServer::
server.d/subversion.conf
IsTimeServer::
server.d/ntp.conf
IsNISServer::
server.d/nis.conf
IsWorkstation::
workstation.d/dns-lookup.conf
What I'd like to be able to get to is a point where, for example,
server.d/ntp.conf could manage everything about an NTP server: ensuring
the packages are installed, giving it the correct server configuration
files, etc. Likewise for workstation.d/ntp.conf might have a slightly
different configuration specific to client-side packages and configuration.
From what I can tell so far in cfengine3 is that "common
control:inputs" is the only place I can add new files to include, and I
don't really see how I can update this list conditionally.
The alternative is to put the system classification in (eg) ntp.conf but
that seems to just lead to much more complex files.
I'm sure I'm just going about this the wrong way, but I can't seem to
find much documentation on how to separate configuration bundles based
on classifications of systems. Any guidance or examples appreciated!
Thanks,
Danny
--
Please note my new email address: [email protected]
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine