Skip to content

Commit

Permalink
Update init.pp
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMalmstrom committed Nov 19, 2024
1 parent b33e2d4 commit 6679093
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions modules/wireguard/manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
class wireguard($current_event, $tunnelip) {
#Pull down clients
file { '/etc/iptables/rules.v4':
ensure => file,
recurse => remote,
source => "puppet:///svn/${current_event}/services/rules.v4",
}

# Open FW
exec { 'Allow FORWARD': # exec resource named 'apt-update'
command => '/usr/sbin/iptables -A FORWARD -j ACCEPT', # command this resource will run
unless => '/usr/sbin/iptables -S FORWARD | grep ACCEPT',
exec { 'fw-rules': # exec resource named 'apt-update'
command => '/usr/sbin/iptables-restore /etc/iptables/rules.v4', # command this resource will run
require => File['/etc/iptables/rules.v4'],
}

# Execute 'apt-get update'
Expand Down

0 comments on commit 6679093

Please sign in to comment.