dnsdist-ansible icon indicating copy to clipboard operation
dnsdist-ansible copied to clipboard

Cant use QPS or pool in "newServer" in dnsdist.conf

Open askilolsen opened this issue 4 years ago • 2 comments

In templates/dnsdist.conf.j2 newServer is defined as: newServer("{{server}}")

This makes it hard to add additional configuration like QPS or pool, removing the '"' and defining server as: "{address='1.1.1.1', pool='testing'}"

Made it possible. Not sure if there is a good reason for using the '"' in the config, but wanted to file the issue to find out

askilolsen avatar Jun 22 '21 07:06 askilolsen

dnsdist_servers is mostly meant as a quickstart, Right now, any additional config can be done by using the dnsdist_config variable:

dnsdist_config: |
    newServer({address='1.1.1.1', pool='testing'})

I'll keep this issue open as a feature request for adding a possibility to define more properties liek this:

dnsdist_servers:
  - name: foo
    address: 192.0.2.1:5300
    pool: bar

pieterlexis avatar Jun 22 '21 07:06 pieterlexis

might be good to mention in the readme that if you just want to use dnsdist_config for everything, you probably want to set this to blank:

dnsdist_locals: []

aoxborrow avatar Sep 27 '24 20:09 aoxborrow