Skip to content

Commit

Permalink
making sure we have a valid ip address before writing the accessConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharumpe committed Dec 2, 2014
1 parent c0a6671 commit 2b56e12
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions manifests/access.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
validate_string( $location )
validate_string( $ip )

concat::fragment { "${location}_${ip}" :
target => $params::accessConfigPath,
order => 10,
content => template( "apache2/default${params::accessConfigPath}-grantToIp-frag.erb" ),
if ( is_ip_address( $ip ) ) {
concat::fragment { "${location}_${ip}" :
target => $params::accessConfigPath,
order => 10,
content => template( "apache2/default${params::accessConfigPath}-grantToIp-frag.erb" ),
}
}
}

0 comments on commit 2b56e12

Please sign in to comment.