On Thu, 13 Nov 2014, Atom Powers wrote:
I have a lot of love for CfEngine3, although I've never used it and
don't know anybody who is.
I refactored all my cfengine version 2 configs to version 3 a few
years ago after Aleksey Tsalolikhin gave a talk locally.
It wasn't an easy transition, but I've fallen completely in love with
its native iteration abilities. For example, cfengine creates image
directories in the tftpboot area of our PXE server:
vars:
centos_6::
"tftpboot_d" string => "/var/lib/tftpboot";
"image_d" string => "$(tftpboot_d)/images";
pxe_s::
# red hat architectures
"rarch" slist => { "i386", "x86_64" };
# centos releases
"crel" slist => { "5", "6", "7" };
# fedora releases
"frel" slist => { "18", "19", "20" };
files:
pxe_s::
# CentOS image directories
"$(image_d)/centos/$(crel)/$(rarch)/."
comment => "centos $(crel) image directory",
perms => rootown( "755" ),
create => "true";
# Fedora image directories
"$(image_d)/fedora/$(frel)/$(rarch)/."
comment => "fedora $(frel) image directory",
perms => rootown( "755" ),
create => "true";
Those last two rules verify the existence of or create 12 different
directories, since each rule will iterate over the release and
architecture lists.
--
Paul Heinlein
[email protected]
45°38' N, 122°6' W
_______________________________________________
Tech mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech
This list provided by the League of Professional System Administrators
http://lopsa.org/