= DESCRIPTION:
My developers and VP want to know how servers are being used, so I embed the page generated by this cookbook in our wiki and its always up to date!
Uses a simple javascript sort that I found at http://yoast.com/articles/sortable-table/
Whats on the page that is generated:
A time stamp of the page generation
A html tabe giving the following for each node
<tr>
<th width="13%">Name</th>
<th width="13%">IP</th>
<th width="13%">Hardware</th>
<th width="13%">OS</th>
<th width="24%">Roles</th>
<th width="24%">Recipes</th>
</tr>
Lastly a server count
= REQUIREMENTS:
Requires a webserver to server the html page from the output location.
= ATTRIBUTES:
The path of the web directory you want to server the report from:
default[:server_inventory][:output_dir] = /var/www/html
Output format can be html or csv, incase you want to import to another system:
default[:server_inventory][:output_format] = "html"
= USAGE:
Add the the run_list of any chef node and view pages via your brower. You may need to update the output_dir for your env.
I suggest a roll, but its not nessary
{
"name": "SERVER_INVENTORY_ROLE",
"default_attributes": {
},
"json_class": "Chef::Role",
"run_list": [
"recipe[server_inventory]"
],
"description": "This role will be on one server that generates a up to date server list with every chef run",
"chef_type": "role",
"override_attributes": {
"server_inventory": {
"output_dir": "/var/www/html/myvirtual.com",
"output_format": "html"
}
}
}
This cookbook has no specified dependencies.
There are no cookbooks that are contingent upon this one.
No quality metric results found