Skip to content

Commit

Permalink
Merge pull request #144 from xaque208/fix-selection-pattern
Browse files Browse the repository at this point in the history
Fix jobs' $selection_pattern
  • Loading branch information
zachfi committed Sep 8, 2019
2 parents 0057ebf + c95ec0f commit 89d6111
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 47 deletions.
28 changes: 0 additions & 28 deletions lib/puppet/parser/functions/address_family.rb

This file was deleted.

2 changes: 1 addition & 1 deletion manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Optional[String] $default_pool_inc,
Optional[String] $default_pool_diff,
Integer $port = 9102,
Stdlib::Ip::Address $listen_address = $facts['ipaddress'],
Optional[String] $listen_address = $facts['ipaddress'],
String $password = 'secret',
Integer $max_concurrent_jobs = 2,
String $director_name = $bacula::director_name,
Expand Down
2 changes: 1 addition & 1 deletion manifests/director.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
String $group = $bacula::bacula_group,
String $homedir = $bacula::homedir,
Optional[String] $job_tag = $bacula::job_tag,
Stdlib::Ip::Address $listen_address = $facts['ipaddress'],
Optional[String] $listen_address = $facts['ipaddress'],
Integer $max_concurrent_jobs = 20,
Boolean $manage_defaults = true,
String $password = 'secret',
Expand Down
2 changes: 1 addition & 1 deletion manifests/storage.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
String $director_name = $bacula::director_name,
String $group = $bacula::bacula_group,
String $homedir = $bacula::homedir,
Stdlib::Ip::Address $listen_address = $facts['ipaddress'],
Optional[String] $listen_address = $facts['ipaddress'],
Integer $maxconcurjobs = 5,
String $media_type = 'File',
String $password = 'secret',
Expand Down
7 changes: 0 additions & 7 deletions spec/functions/address_family_spec.rb

This file was deleted.

14 changes: 6 additions & 8 deletions templates/_listen.epp
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<%
|
Stdlib::Ip::Address $listen_address,
String $listen_address,
Optional[Integer] $port,
|
-%>
<% $family = address_family($listen_address)
if $family == 'INET' { -%>
ipv4 = {
<%= $listen_address ? {
Stdlib::IP::Address::V4::Nosubnet => 'ipv4',
Stdlib::IP::Address::V6::Nosubnet => 'ipv6',
default => 'ip',
} %> = {
addr = <%= $listen_address %>;
<% } elsif $family == 'INET6' { -%>
ipv6 = {
addr = <%= $listen_address %>;
<% } -%>
<% if $port { -%>
port = <%= $port %>;
<% } -%>
Expand Down
2 changes: 1 addition & 1 deletion templates/job.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Job {
Selection Type = <%= $selection_type %>
<%- } -%>
<%- if $selection_pattern { -%>
Selection Type = <%= $selection_pattern %>
Selection Pattern = <%= $selection_pattern %>
<%- } -%>
<% } -%>

Expand Down

0 comments on commit 89d6111

Please sign in to comment.