From c02d808e8e879150da1b779d056a16d7a03c3876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20H=C3=A4feli?= Date: Wed, 3 Jan 2018 15:58:59 +0100 Subject: [PATCH 1/3] allow setting the user id over the resource --- lib/puppet/provider/bmcuser/ipmitool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/bmcuser/ipmitool.rb b/lib/puppet/provider/bmcuser/ipmitool.rb index 405b612..f5fafe7 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 From 278c03c37877c3680e063108cbf8433d326516bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20H=C3=A4feli?= Date: Wed, 3 Jan 2018 16:00:56 +0100 Subject: [PATCH 2/3] workaround empty username / anonymous user --- lib/puppet/provider/bmcuser/ipmitool.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/puppet/provider/bmcuser/ipmitool.rb b/lib/puppet/provider/bmcuser/ipmitool.rb index f5fafe7..bfb194c 100644 --- a/lib/puppet/provider/bmcuser/ipmitool.rb +++ b/lib/puppet/provider/bmcuser/ipmitool.rb @@ -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, From f0e813e16f6cb3a95ea7490417cfe1ee4a086a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20H=C3=A4feli?= Date: Thu, 4 Jan 2018 10:20:04 +0100 Subject: [PATCH 3/3] remove ruby 1.9.3 support because it's EOL --- .travis.yml | 1 - 1 file changed, 1 deletion(-) 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: