Open scalp42 opened 9 years ago
As of vagrant-ohai 0.1.12 (Vagrant 1.7.2)
, no vagrant attributes are set when using the plugin.
There used to be at least a vagrant => { box => 'ubuntu_aws' }
attribute, which I could leverage to differentiate servers spun up through vagrant-aws
and "classic" EC2 instances.
It looks like it's checking for vagrant.json
:
unless File.exist?('/etc/chef/ohai_plugins/vagrant.json')
Ohai::Log.fail('Ohai has not set :ipaddress (Missing vagrant.json)')
else
vagrant = read_json('/etc/chef/ohai_plugins/vagrant.json')
File exists, but no attributes are being set.
Also unrelated:
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
==> aws1: [2015-06-17T19:57:55+00:00] WARN: Plugin Definition Error: </etc/chef/ohai_plugins/vagrant.rb>: collect_data already defined on platform default
Hey @avishai-ish-shalom
Any chance to be able to set a vagrant attribute through this plugin on vagrant up and vagrant provision please? Even a
vagrant => { vagrant => true }
would do.We don't need to mess with the NICs on AWS, but it'd allow to figure if the box is running through vagrant-aws or not.
Let me know!
Thanks in advance