summaryrefslogtreecommitdiff
path: root/kitchen-tests/cookbooks
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-06-13 14:59:33 -0700
committerTim Smith <tsmith@chef.io>2021-06-13 15:27:57 -0700
commitd507902f201ee82b4e8a5a0cc21d27fe05ea4e56 (patch)
treed7b4c756f1431b10f0297704306dbaf91acbfc92 /kitchen-tests/cookbooks
parenta5c04443634b7a780a764191f3a80bed2c8c2218 (diff)
downloadchef-d507902f201ee82b4e8a5a0cc21d27fe05ea4e56.tar.gz
Add windows_defender and windows_defender_exclusion resources
These were originally written for the desktop-config cookbook. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests/cookbooks')
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb25
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/windows.rb1
2 files changed, 26 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb
new file mode 100644
index 0000000000..4565998f26
--- /dev/null
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/_windows_defender.rb
@@ -0,0 +1,25 @@
+#
+# Cookbook:: end_to_end
+# Recipe:: _windows_defender
+#
+# Copyright:: Copyright (c) Chef Software Inc.
+#
+
+windows_defender 'Configure Windows Defender' do
+ realtime_protection true
+ intrusion_protection_system true
+ lock_ui true
+ scan_archives true
+ scan_scripts true
+ scan_email true
+ scan_removable_drives true
+ scan_network_files false
+ scan_mapped_drives false
+ action :enable
+end
+
+windows_defender_exclusion 'Exclude PNG files' do
+ extensions 'png'
+ process_paths 'c:\\windows\\system32'
+ action :add
+end
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
index f4cd74e3bf..20140ff7e0 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/windows.rb
@@ -178,3 +178,4 @@ windows_certificate "c:/mordor/ca.cert.pem" do
end
include_recipe "::_windows_printer"
+include_recipe "::_windows_defender"