LoginSignup
1
1

More than 5 years have passed since last update.

Itamae | Ohai 連携オプション #devops #itamae

Posted at

Itamae | Ohai 連携オプション #devops #itamae

概要

プロビジョニングツール Itamae

Ohai 連携オプションでサーバー情報を Node から利用します。
Ohai は環境の情報取得用のライブラリ。

※ ohai については下記リンク参照
https://github.com/opscode/ohai
http://docs.getchef.com/ohai.html

試行

レシピを作成

require 'pp'

pp node[:platform]
pp node[:platform_version]
pp node[:hostname]
pp node[:languages][:ruby]

実行

$ itamae local --ohai recipe.rb
"12.04"
"precise64"
{"host_vendor"=>"unknown",
 "gem_bin"=>"/usr/local/bin/gem",
 "target_os"=>"linux",
 "host"=>"x86_64-unknown-linux-gnu",
 "target_vendor"=>"unknown",
 "gems_dir"=>"/usr/local/lib/ruby/gems/2.0.0",
 "platform"=>"x86_64-linux",
 "bin_dir"=>"/usr/local/bin",
 "target_cpu"=>"x86_64",
 "release_date"=>"2013-11-22",
 "host_os"=>"linux-gnu",
 "ruby_bin"=>"/usr/local/bin/ruby",
 "host_cpu"=>"x86_64",
 "version"=>"2.0.0",
 "target"=>"x86_64-unknown-linux-gnu"}
 INFO : Recipe: /home/vagrant/ohai_test/recipe.rb

参照

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1