diff --git a/Vagrantfile b/Vagrantfile index be91f9e..5edc089 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -14,7 +14,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "dummy" config.vm.provider :rackspace do |rs| rs.username = ENV['RAX_USERNAME'] - rs.admin_pass = ENV['VAGRANT_ADMIN_PASS'] + rs.admin_password = ENV['VAGRANT_ADMIN_PASSWORD'] rs.api_key = ENV['RAX_API_KEY'] rs.flavor = /1 GB Performance/ rs.image = /Ubuntu/ diff --git a/lib/vagrant-rackspace/action/create_server.rb b/lib/vagrant-rackspace/action/create_server.rb index d4da37d..3b5bf4e 100644 --- a/lib/vagrant-rackspace/action/create_server.rb +++ b/lib/vagrant-rackspace/action/create_server.rb @@ -59,16 +59,8 @@ def call(env) :metadata => config.metadata } - if config.admin_pass - options[:password] = config.admin_pass - end - - if config.user_data - options[:user_data] = File.read(config.user_data) - end - - if config.config_drive - options[:config_drive] = config.config_drive + if config.admin_password + options[:password] = config.admin_password end if config.key_name diff --git a/lib/vagrant-rackspace/config.rb b/lib/vagrant-rackspace/config.rb index 7975e15..92c1f26 100644 --- a/lib/vagrant-rackspace/config.rb +++ b/lib/vagrant-rackspace/config.rb @@ -103,11 +103,11 @@ class Config < Vagrant.plugin("2", :config) attr_accessor :rsync_includes # Password to set for root (on Linux) or Administrator (on Windows) - # A random password will be generated if admin_pass is not set or + # A random password will be generated if admin_password is not set or # does not meet the password requirements of the operating system. # # @return [String] - attr_accessor :admin_pass + attr_accessor :admin_password # Default Rackspace Cloud Network IDs SERVICE_NET_ID = '11111111-1111-1111-1111-111111111111' diff --git a/spec/vagrant-rackspace/config_spec.rb b/spec/vagrant-rackspace/config_spec.rb index 82c2375..a5f3239 100644 --- a/spec/vagrant-rackspace/config_spec.rb +++ b/spec/vagrant-rackspace/config_spec.rb @@ -24,7 +24,7 @@ its(:disk_config) { should be_nil } its(:networks) { should be_nil } its(:rsync_includes) { should be_nil } - its(:admin_pass) { should be_nil } + its(:admin_password) { should be_nil } end describe "overriding defaults" do @@ -39,7 +39,7 @@ :server_name, :disk_config, :username, - :admin_pass].each do |attribute| + :admin_password].each do |attribute| it "should not default #{attribute} if overridden" do subject.send("#{attribute}=".to_sym, "foo") subject.finalize!