https://github.com/melonsmasher/chef_profiled
Generates profile.d scripts based on Chef attributes.
https://github.com/melonsmasher/chef_profiled
chef chef-cookbook chef-recipes linux profiled script unix unix-like
Last synced: 4 months ago
JSON representation
Generates profile.d scripts based on Chef attributes.
- Host: GitHub
- URL: https://github.com/melonsmasher/chef_profiled
- Owner: MelonSmasher
- License: mit
- Created: 2019-03-05T14:37:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T13:09:12.000Z (over 5 years ago)
- Last Synced: 2023-08-01T01:12:07.196Z (almost 3 years ago)
- Topics: chef, chef-cookbook, chef-recipes, linux, profiled, script, unix, unix-like
- Language: Ruby
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chef_profiled
Manages profile.d scripts through Chef attributes.
# Usage
### chef_profiled::default
Just include `chef_profiled::default` in your node's `run_list`:
```json
{
"name":"my_node",
"run_list": [
"recipe[chef_profiled]"
]
}
```
## Attributes
##### Note: see `attributes/` for all attributes.
### Scripts:
An array of script entries to place in /etc/profile.d. Each script should have an array of lines.
Default Value:
- `[]`
Ruby usage:
```ruby
node['chef_profiled']['scripts'] = [
'testscript' => [
'export SOMEVAR = "SOMEVAL";',
'export SOMEVAR2 = "SOMEVAL2";'
]
]
```
JSON usage:
```json
{
"chef_profiled": {
"scripts": {
"testscript": [
"export SOMEVAR = \"SOMEVAL\";",
"export SOMEVAR2 = \"SOMEVAL2\";"
]
}
}
}
```
Both examples will create the following file: `/etc/profile.d/testscript.sh`:
```bash
export SOMEVAR = "SOMEVAL";
export SOMEVAR2 = "SOMEVAL2";
```