-
Notifications
You must be signed in to change notification settings - Fork 181
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
Is there a way that individual zones can be defined in a separate file? #62
Comments
I got this to work, so I'll share it with everyone. First create a dict file for each zone in a subdirectory named "zones". Use include_vars to read all the files in that directory, then merge all the dicts into bind_zone_domains as a pre_task. Separating the zones will make it easier to manage. $HOME/zones/adfstest.example.com.yml
$HOME/zones/eratest.example.com.yml
$HOME/playbook.yml:
|
Is there a more elegant way to do this? |
@WRJFontenot, my workaround is the same as yours, but without group_vars/bind_server/main.yml
group_vars/bind_server/prod.yml
group_vars/bind_server/test.yml
|
Would it help to allow the user to specify a list of files containing dicts that will be imported when defined? |
I'd actually prefer if I could hand this role a (local/templated) file already containing the full zone file (pre-rendered). |
There are other roles for BIND that allow you to do this, but this one
doesn't. I also have no plans to implement this as a feature.
The intention of this role is precisely to allow you to have syntactically
correct zone files without having to worry too much about the weird
syntax...
…On Sun, 28 Oct 2018 at 19:07, BenBE ***@***.***> wrote:
I'd actually prefer if I could hand this role a (local/templated) file
already containing the full zone file (pre-rendered).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAavfCD9mS9yct5Jpa8JwLRaHR0VgMdtks5upfJNgaJpZM4Vs8Ls>
.
|
I have same problem with many domains. The problem with the above implementation is that the number of domains may change and I don’t want to edit the role code or play hands every time i add new domain.
I have zone files in
Where DNS and DNS_MASTER parent and child groups $ group_vars/DNS/DNS_MASTER/zones/test_ru.zone.yml
$ group_vars/DNS/DNS_MASTER/zones/test2_ru.zone.yml
Everything works as if you are setting everything up in one variable. |
@WRJFontenot @mobilesfinks there are great alternative solutions here. Please consider submitting a PR, with a document showing how to handle a large number of seperate zone files/domains. |
bind_zone_domain is manageable if you have a small number of zones and a small number of hosts in each zone. It becomes problematic if you have a large number of zones and hosts in each zone. Is there a way to have the zones/hosts defined in separate files to improve manageability?
The text was updated successfully, but these errors were encountered: