Forum: CFEngine Help Subject: policy_path.dat selecting config source from server Author: tdr Link to topic: https://cfengine.com/forum/read.php?3,25625,25625#msg-25625
Hi, Just a note on how we dealt with a little config management management ;-) issue. We were interested in a way to manage multiple versions of CFE client scripts served from a single CFE server. I took the idea of using a "policy_server.dat" file that identifies the server a client will contact and added a file "policy_path.dat" that identifies the top path that the client will fetch files from. This seemed like a handy way to allow some clients to be configured from a development configuration while the production config goes unchanged. We are also likely to use it to serve a frozen or tagged configuration to some clients. One the server, the client configs are stored below paths such as: /var/cfengine/masterfiles /var/cfengine/masterfiles-devel /var/cfengine/masterfiles-frozen Then in the update.cf the .dat files are read into variables: vars: "policy_server_dat" comment => "IP of my policy host, read from file", string => readfile("$(sys.workdir)/policy_server.dat",40); "policy_path_dat" comment => "Path to my config on policy host, read from file", string => readfile("$(sys.workdir)/policy_path.dat",80); We have defaults built into the update.cf if these files aren't read. Remember to allow access to all needed paths in the server access_rules block. Cheers, Tom Rockwell Michigan State U. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine