Module: AwsWatcher::Chef
- Includes:
- AwsCleaner::Chef
- Defined in:
- lib/aws-watcher.rb
Class Method Summary collapse
Class Method Details
.registered?(instance_id, config) ⇒ Boolean
6 7 8 9 10 11 12 13 14 |
# File 'lib/aws-watcher.rb', line 6 def self.registered?(instance_id, config) chef = AwsCleaner::Chef.client(config) results = chef.search.query(:node, "ec2_instance_id:#{instance_id} OR chef_provisioning_reference_server_id:#{instance_id}") if results.rows.empty? false else true end end |