Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vagrant attribute on AWS #15

Open
scalp42 opened this issue Jun 17, 2015 · 3 comments
Open

vagrant attribute on AWS #15

scalp42 opened this issue Jun 17, 2015 · 3 comments

Comments

@scalp42
Copy link

scalp42 commented Jun 17, 2015

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

@scalp42
Copy link
Author

scalp42 commented Jun 17, 2015

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.

@scalp42
Copy link
Author

scalp42 commented Jun 17, 2015

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.

@scalp42
Copy link
Author

scalp42 commented Jun 17, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant