Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
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
11 changes: 10 additions & 1 deletion manifests/rule.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# === Actions:
#
# On RHEL
# Deploys /etc/sysconfig/networking-scripts/rule-$name
# Deploys /etc/sysconfig/networking-scripts/rule-$name and /etc/sysconfig/networking-scripts/rule6-$name
#
# On Debian
# Deploys 2 files, 1 under /etc/network/if-up.d and 1 in /etc/network/if-down.d
Expand Down Expand Up @@ -51,6 +51,15 @@
content => template('network/rule-RedHat.erb'),
notify => $network::manage_config_file_notify,
}
file { "rule6-${interface}":
ensure => present,
owner => root,
group => root,
mode => '0644',
path => "/etc/sysconfig/network-scripts/rule6-${interface}",
content => template('network/rule6-RedHat.erb'),
notify => $network::manage_config_file_notify,
}
}
'Suse': {
file { "ifrule-${interface}":
Expand Down
6 changes: 4 additions & 2 deletions templates/rule-RedHat.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
###
### File managed by Puppet
###
<% @iprule.each do |rule| -%>
<%= rule %>
<%- (0..(@iprule.length-1)).each do |id| -%>
<%- if @family and @family[id] != 'inet6' -%>
<%= @iprule[id] %>
<% end -%>
<%- end -%>
8 changes: 8 additions & 0 deletions templates/rule6-RedHat.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
###
### File managed by Puppet
###
<%- (0..(@iprule.length-1)).each do |id| -%>
<%- if @family and @family[id] == 'inet6' -%>
<%= @iprule[id] %>
<% end -%>
<%- end -%>