Manages profile.d scripts through Chef attributes.
Just include chef_profiled::default
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[chef_profiled]"
]
}
An array of script entries to place in /etc/profile.d. Each script should have an array of lines.
Default Value:
[]
Ruby usage:
node['chef_profiled']['scripts'] = [
'testscript' => [
'export SOMEVAR = "SOMEVAL";',
'export SOMEVAR2 = "SOMEVAL2";'
]
]
JSON usage:
{
"chef_profiled": {
"scripts": {
"testscript": [
"export SOMEVAR = \"SOMEVAL\";",
"export SOMEVAR2 = \"SOMEVAL2\";"
]
}
}
}
Both examples will create the following file: /etc/profile.d/testscript.sh
:
export SOMEVAR = "SOMEVAL";
export SOMEVAR2 = "SOMEVAL2";