summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_firewall_rule.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-30 15:07:39 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-30 15:26:51 -0700
commit2cf99476ba3b27339a7bfa1415184c82ae50ada8 (patch)
treed615dddac6ab271e50d9d3b643232f855d4c7ee4 /lib/chef/resource/windows_firewall_rule.rb
parente4df521092ada86be9adbdc7567e6deeea24c46d (diff)
downloadchef-2cf99476ba3b27339a7bfa1415184c82ae50ada8.tar.gz
Add missing examples and resource formatting for docs site
Get us closer to automated documentation. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/windows_firewall_rule.rb')
-rw-r--r--lib/chef/resource/windows_firewall_rule.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb
index 0ba4c60a46..f7f22856d6 100644
--- a/lib/chef/resource/windows_firewall_rule.rb
+++ b/lib/chef/resource/windows_firewall_rule.rb
@@ -26,10 +26,11 @@ class Chef
class WindowsFirewallRule < Chef::Resource
provides :windows_firewall_rule
- description "Use the windows_firewall_rule resource to create, change or remove Windows firewall rules."
+ description "Use the **windows_firewall_rule** resource to create, change or remove Windows firewall rules."
introduced "14.7"
examples <<~DOC
- Allowing port 80 access
+ **Allowing port 80 access**:
+
```ruby
windows_firewall_rule 'IIS' do
local_port '80'
@@ -38,7 +39,8 @@ class Chef
end
```
- Allow protocol ICMPv6 with ICMP Type
+ **Allow protocol ICMPv6 with ICMP Type**:
+
```ruby
windows_firewall_rule 'CoreNet-Rule' do
rule_name 'CoreNet-ICMP6-LR2-In'
@@ -49,7 +51,8 @@ class Chef
end
```
- Blocking WinRM over HTTP on a particular IP
+ **Blocking WinRM over HTTP on a particular IP**:
+
```ruby
windows_firewall_rule 'Disable WinRM over HTTP' do
local_port '5985'
@@ -59,7 +62,8 @@ class Chef
end
```
- Deleting an existing rule
+ **Deleting an existing rule**
+
```ruby
windows_firewall_rule 'Remove the SSH rule' do
rule_name 'ssh'