Hello,
Consider the following;
You have a number of sites, all controlled by puppet. You have
identified which files that are common to every host, and then which
files are common to any particular site. Finally, you have the files
which are private to the node in question.
What I was wondering was if it would be possible to have some sort of
directory hierarchy which has some kind of precedence, or order.
The following example tree explains it,
regional/root/.ssh/authorized_keys
regional/etc/nsswitch.conf
siteA/etc/resolv.conf
siteB/etc/resolv.conf
node1/etc/motd
node2/etc/motd
Now, I would rather not write rules for every single file, I would like
to write one generic rule that does the following - if a file is found
in regional, they are distributed to all my nodes, and the structure
within regional/ is the relative root. All files, recursively down the
tree structure, gets applied to all nodes.
Unless the same path and file is found in siteA/ then that files takes
precedence over regional. Finally, if the same path and file is found on
node2, that is the file which will get applied in the end.
So, it''s actually two rather large questions. Is it possible to
recursively traverse a tree structure and apply files to nodes, and then
is it possible to have some kind of precedence list as to which files
gets applied in the end?
Having this kind of approach will make the distribution of files very
easy, and the threshold of writing rules for every single file on your
systems gets overcome.
Any comments?
//Andreas Loong
--
CES 1984 - "The Lorraine''s graphics are a whole step ahead of any
personal computer now on the market. This computer is potentially powerful
enough to make an IBM-PC look like a four-function calculator."