Skip to content

Commit 55af23f

Browse files
author
Dennis Hoer
committed
Rename sensitive attribute to confidential to be Chef 13 compatible
1 parent 70120c5 commit 55af23f

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Changelog
22

3-
## 1.1.0 - 2017/01/02
3+
## 2.0.0 - 2017-03-17
4+
5+
- Rename sensitive attribute to confidential to be Chef 13 compatible
6+
7+
## 1.1.0 - 2017-01-02
48

59
- Add sensitive attribute
610
- Use use_inline_resources
711

8-
## 1.0.0 - 2015/03/28
12+
## 1.0.0 - 2015-03-28
913

1014
- Initial release (ported over from windows_desktop)

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ under home directory, then make sure you have the appropriate group permissions.
3838

3939
#### Attributes
4040

41-
- `username` - Username of account to create and populate home directory for. Defaults to name of the resource block.
41+
- `username` - Username of account to create and populate home directory
42+
for. Defaults to name of the resource block.
4243
- `password` - The password of the user (required).
44+
- `confidential` - Ensure that sensitive resource data is not logged by
45+
the chef-client. Default: `true`.
4346

4447
#### Example
4548

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
77
source_url 'https://github.com/dhoer/chef-windows_home' if respond_to?(:source_url)
88
issues_url 'https://github.com/dhoer/chef-windows_home/issues' if respond_to?(:issues_url)
9-
version '1.1.0'
9+
version '2.0.0'
1010

1111
supports 'windows'

providers/default.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ def whyrun_supported?
1616
# Create whoami as scheduled task to get Local Server group privilege:
1717
# SeAssignPrimaryTokenPrivilege (Replace a process-level token)
1818
execute "create_#{task_name}_task" do
19-
sensitive new_resource.sensitive
20-
command <<-EOF
19+
sensitive new_resource.confidential
20+
command <<EOF
2121
schtasks /Create /TN "#{task_name}" /SC once /SD "01/01/2003" /ST "00:00" \
2222
/TR "whoami.exe" /RU "#{new_resource.username}" /RP "#{new_resource.password}" /RL HIGHEST
23-
EOF
23+
EOF
2424
only_if { task_query(task_name).empty? }
2525
end
2626

resources/default.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,4 @@
44
attribute :username, kind_of: String, name_attribute: true
55
attribute :password, kind_of: String, required: true
66

7-
attribute :sensitive, kind_of: [TrueClass, FalseClass] # , default: true - see initialize below
8-
9-
# Chef will override sensitive back to its global value, so set default to true in init
10-
def initialize(*args)
11-
super
12-
@sensitive = true
13-
end
7+
attribute :confidential, kind_of: [TrueClass, FalseClass], default: true

0 commit comments

Comments
 (0)