in Chef_Processors/ChefAttributeList.py [0:0]
def main(self):
"""Main."""
att_prefix = "munki['%s']['%s']" % (
self.env["attribute_version"],
self.env["attribute"],
)
self.env["chef_block"] = att_prefix + " = [\n"
for value in self.env["value"].split(","):
# attribute = '%s = [\n'
# print "Value: %s" % value
self.env["chef_block"] += " '%s',\n" % str(
os.path.join(self.env["path_prefix"], value)
)
self.env["chef_block"] += "]\n"
self.output("Chef block: %s" % self.env["chef_block"])
self.env["attribute_variable"] = att_prefix.replace("default", "node")