Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert firewalld_service docs to puppet-strings #267

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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