Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix216 #217

Merged
merged 5 commits into from
May 13, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions manifests/agent.pp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@
# is set to for example "eth1" or "bond0.73".
if ($listenip != undef) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole thing could be turned into a case statement to a little clearer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but lets leave that for another time maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. referenced in another issue.

if ($listenip =~ /^(eth|bond|lxc|eno|tap|tun).*/) {
$int_name = "ipaddress_${listenip}"
$listen_ip = inline_template('<%= scope.lookupvar(int_name) %>')
$int_name = getvar("::ipaddress_${listenip}")
} elsif is_ip_address($listenip) or $listenip == '*' {
$listen_ip = $listenip
} else {
Expand Down
3 changes: 1 addition & 2 deletions manifests/proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@
# is set to for example "eth1" or "bond0.73".
if ($listenip != undef) {
if ($listenip =~ /^(eth|bond|lxc|eno|tap|tun).*/) {
$int_name = "ipaddress_${listenip}"
$listen_ip = inline_template('<%= scope.lookupvar(int_name) %>')
$int_name = getvar("::ipaddress_${listenip}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heck, we could even put it into a function, seeing how we've got it twice :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mentioned that in #212. We should track that in a further PR.

} elsif is_ip_address($listenip) {
$listen_ip = $listenip
} else {
Expand Down