https://github.com/tkuchiki/ohai-plugin-amazon-linux
Ohai plugin for Amazon Linux
https://github.com/tkuchiki/ohai-plugin-amazon-linux
amazon-linux chef ohai plugin
Last synced: 3 months ago
JSON representation
Ohai plugin for Amazon Linux
- Host: GitHub
- URL: https://github.com/tkuchiki/ohai-plugin-amazon-linux
- Owner: tkuchiki
- License: apache-2.0
- Created: 2018-03-29T02:13:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T03:12:12.000Z (about 7 years ago)
- Last Synced: 2025-01-25T09:11:08.587Z (4 months ago)
- Topics: amazon-linux, chef, ohai, plugin
- Language: Ruby
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ohai-plugin-amazon-linux
Ohai plugin for Amazon Linux
# Usage
## ohai command
```console
# Amazon Linux 1
$ ohai -d /path/to/plugin/dir | jq .amazon_linux
{
"major_version": 1,
"version": "2017.09",
"init_package": "init"
}# Amazon Linux 2
$ ohai -d /path/to/plugin/dir | jq .amazon_linux
{
"major_version": 2,
"version": "2017.12",
"init_package": "systemd"
}
```## chef
```ruby
# (client|knife|solo).rb
Ohai::Config[:plugin_path] << '/path/to/plugins'
``````ruby
# in cookbook
node[:amazon_linux][:major_version]
node[:amazon_linux][:version]
node[:amazon_linux][:init_package]
```