Hi all -
I’m trying to template files on central servers that’ll help bootstrap
new machines. I find myself needing to query Node Attributes that are
assembled from nested Roles on Nodes that may never have booted or run
The key I’m interested in is a deeply nested hash but is entirely
deterministic; i.e. unrelated to any runtime information or ohai
Attributes from the Node. The key has been designed so that, using the
current (0.9) Attribute merge functionality, the correct information
theoretically ends up on the Node object; it does, however, definitely
require deep merging to be done, and can be considered to be
I’m well aware that I can’t mock up a chef run 100% and expect the
correct result, but I’m taking care to isolate this one key such that
it will never change (FSVO “never”) and is utterly untouched by any
recipes - only Roles affect it. It contains things like the build
NIC’s MAC; the OS name; etc; that are useful in writing out a
dhcpd.conf, for example.
How can I coalesce the set of Attributes inherited by an as-yet
inbuilt Node from its Roles and make it as equally accessible as those
Attributes from already-running Nodes?
Is anyone else doing something like this? How?
Is shef the way forward? (The wiki page seems to rule out loading Roles…)
[Chef-client & -server 0.9.12 on Ubuntu Lucid, FWIW]