diff options
author | Patrick Schaumburg <pschaumburg@tecracer.de> | 2020-03-30 10:28:43 +0200 |
---|---|---|
committer | Patrick Schaumburg <pschaumburg@tecracer.de> | 2020-03-30 10:28:43 +0200 |
commit | 08b457f75279927d4a023d5d73e2d78aa18fdf9a (patch) | |
tree | 6be8c47c0fbc0fcb96afa824e58a58dfdb4bdde8 | |
parent | 64ee547b9f8aa9c9508db42a2ca19e7de54c3ee5 (diff) | |
download | chef-08b457f75279927d4a023d5d73e2d78aa18fdf9a.tar.gz |
add existing examples to code
Signed-off-by: Patrick Schaumburg <pschaumburg@tecracer.de>
-rw-r--r-- | lib/chef/resource/windows_firewall_rule.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb index 1777ccad37..1f4dac4937 100644 --- a/lib/chef/resource/windows_firewall_rule.rb +++ b/lib/chef/resource/windows_firewall_rule.rb @@ -28,6 +28,34 @@ class Chef description "Use the windows_firewall_rule resource to create, change or remove windows firewall rules." introduced "14.7" + examples <<~DOC + Allowing port 80 access + ```ruby + windows_firewall_rule 'IIS' do + local_port '80' + protocol 'TCP' + firewall_action :allow + end + ``` + + Blocking WinRM over HTTP on a particular IP + ```ruby + windows_firewall_rule 'Disable WinRM over HTTP' do + local_port '5985' + protocol 'TCP' + firewall_action :block + local_address '192.168.1.1' + end + ``` + + Deleting an existing rule + ```ruby + windows_firewall_rule 'Remove the SSH rule' do + rule_name 'ssh' + action :delete + end + ``` + DOC property :rule_name, String, name_property: true, |