Trivial: I'm guessing that 

```ruby
"#{deploy_env['VARNISH_LISTEN_ADDRESS'].empty? ? "localhost" : deploy_env['VARNISH_LISTEN_ADDRESS']}"
```

can be replaced with 

```ruby
"#{deploy_env['VARNISH_LISTEN_ADDRESS'] || "localhost"}"
```