Skip to content

Instantly share code, notes, and snippets.

@sawanoboly
Created April 11, 2013 03:46
Show Gist options
  • Save sawanoboly/5360579 to your computer and use it in GitHub Desktop.
Save sawanoboly/5360579 to your computer and use it in GitHub Desktop.
Ohai Plugin for AWS OpsWorks
provides 'opsworks'
require 'mixlib/shellout'
require 'json'
unless opsworks
opsworks Mash.new
cmd = Mixlib::ShellOut.new("opsworks-agent-cli stack_state")
state = cmd.run_command
opsworks[:stack_state] = JSON.parse(state.stdout)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment