Skip to content

Commit 95e90e6

Browse files
authored
Merge pull request #286 from microsoft/hotfix/secure-token
idempotence fix for macos_user SecureToken
2 parents 2baddf1 + c600e48 commit 95e90e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
license 'MIT'
55
description 'Resources for configuring and provisioning macOS'
66
chef_version '>= 16.0'
7-
version '6.0.0'
7+
version '6.0.1'
88

99
source_url 'https://github.com/Microsoft/macos-cookbook'
1010
issues_url 'https://github.com/Microsoft/macos-cookbook/issues'

resources/macos_user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def user_already_exists?
123123
end
124124

125125
action :create do
126-
if new_resource.secure_token && !property_is_set?(:existing_token_auth)
126+
if new_resource.secure_token && !secure_token_enabled? && !property_is_set?(:existing_token_auth)
127127
raise "An existing_token_auth hash must be provided if you want a secure token for #{new_resource.username}!" unless logged_in?('_mbsetupuser') || logged_in?('vagrant')
128128
end
129129

0 commit comments

Comments
 (0)