Skip to content

Commit

Permalink
Merge pull request #267 from alexjfisher/puppet_strings_firewalld_ser…
Browse files Browse the repository at this point in the history
…vice

Convert `firewalld_service` docs to puppet-strings
  • Loading branch information
alexjfisher authored Mar 6, 2020
2 parents c864726 + 6f25cbe commit a4ef580
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
24 changes: 15 additions & 9 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* [`firewalld_ipset`](#firewalld_ipset): Configure IPsets in Firewalld Example: firewalld_ipset {'internal net': ensure => 'present', type => 'hash:net',
* [`firewalld_port`](#firewalld_port): Assigns a port to a specific firewalld zone. firewalld_port will autorequire the firewalld_zone specified in the zone parameter so there is n
* [`firewalld_rich_rule`](#firewalld_rich_rule): Manages firewalld rich rules. firewalld_rich_rules will autorequire the firewalld_zone specified in the zone parameter so there is no need t
* [`firewalld_service`](#firewalld_service): Assigns a service to a specific firewalld zone. firewalld_service will autorequire the firewalld_zone specified in the zone parameter and
* [`firewalld_service`](#firewalld_service): Assigns a service to a specific firewalld zone.
* [`firewalld_zone`](#firewalld_zone): Creates and manages firewalld zones.

## Classes
Expand Down Expand Up @@ -833,16 +833,22 @@ handle pruning of rules
### firewalld_service

Assigns a service to a specific firewalld zone.
firewalld_service will autorequire the firewalld_zone specified in the zone parameter and the firewalld::custom_service
specified in the service parameter, so there is no need to add dependencies for this

Example:
`firewalld_service` will autorequire the `firewalld_zone` specified in the
`zone` parameter and the `firewalld::custom_service` specified in the `service`
parameter. There is no need to manually add dependencies for this.

firewalld_service {'Allow SSH in the public Zone':
ensure => 'present',
zone => 'public',
service => 'ssh',
}
#### Examples

##### Allowing SSH

```puppet
firewalld_service {'Allow SSH in the public Zone':
ensure => present,
zone => 'public',
service => 'ssh',
}
```

#### Properties

Expand Down
30 changes: 17 additions & 13 deletions lib/puppet/type/firewalld_service.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
require 'puppet'

Puppet::Type.newtype(:firewalld_service) do
@doc = "Assigns a service to a specific firewalld zone.
firewalld_service will autorequire the firewalld_zone specified in the zone parameter and the firewalld::custom_service
specified in the service parameter, so there is no need to add dependencies for this
Example:
firewalld_service {'Allow SSH in the public Zone':
ensure => 'present',
zone => 'public',
service => 'ssh',
}
"
desc <<-DOC
@summary
Assigns a service to a specific firewalld zone.
Assigns a service to a specific firewalld zone.
`firewalld_service` will autorequire the `firewalld_zone` specified in the
`zone` parameter and the `firewalld::custom_service` specified in the `service`
parameter. There is no need to manually add dependencies for this.
@example Allowing SSH
firewalld_service {'Allow SSH in the public Zone':
ensure => present,
zone => 'public',
service => 'ssh',
}
DOC

ensurable do
newvalue(:present) do
Expand Down

0 comments on commit a4ef580

Please sign in to comment.