Created
May 9, 2016 15:15
-
-
Save allen00se/7d1319b92d9211697d77f5c27e122582 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class firewalld { | |
package { 'firewalld': | |
ensure => present, # install package | |
} | |
# iptables service that comes with rhel/centos | |
service { 'iptables': # don't let this interfere | |
ensure => stopped, # ensure it's stopped | |
enable => false, # don't start on boot | |
} | |
service { 'ip6tables': # don't let this interfere | |
ensure => stopped, # ensure it's stopped | |
enable => false, # don't start on boot | |
} | |
service { 'firewalld': | |
ensure => running, # ensure it's running | |
enable => true, # start on boot | |
hasstatus => true, # init script has 'status' command | |
hasrestart => true, # init script has 'restart' command | |
require => [ | |
Package['firewalld'], | |
File['/etc/firewalld/firewalld.conf'], # require this file | |
Service['iptables', 'ip6tables'], # ensure it's stopped | |
], | |
} | |
firewalld::service { 'nagios_nrpe': | |
short => 'Nagios_NRPE', | |
description => 'Nagios_NRPE', | |
ports => [{protocol => 'tcp', port => '5666',},], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment