diff --git a/.travis.yml b/.travis.yml index a2b9328..95f4323 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ language: ruby bundler_args: --without development integration script: "bundle exec gem list && bundle exec rake spec" rvm: -- 1.9.3 - 2.0.0 env: matrix: diff --git a/lib/puppet/provider/bmcuser/ipmitool.rb b/lib/puppet/provider/bmcuser/ipmitool.rb index 405b612..bfb194c 100644 --- a/lib/puppet/provider/bmcuser/ipmitool.rb +++ b/lib/puppet/provider/bmcuser/ipmitool.rb @@ -39,7 +39,7 @@ def create # get the user id supplied by the resource or find out the current user id # if a user id cannot be found, try and create a new user id by looking for empty slots def id - @id ||= @property_hash[:id] || user_id(resource[:username]) + @id ||= @property_hash[:id] || @resource[:id] || user_id(resource[:username]) end def destroy @@ -114,6 +114,7 @@ def self.instances # skip the header next if line.match(/^ID/) next if line.match(/Empty/i) + next if line.match(/^1/) id, name, callin, linkauth, enabled, priv = line.chomp.split(' ', 6) # create the resource users << new(:name => name, :username => name, :id => id, :ensure => :present,