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

Requirement to set primaries even if type=primary #184

Open
Yannik opened this issue Apr 4, 2022 · 0 comments
Open

Requirement to set primaries even if type=primary #184

Yannik opened this issue Apr 4, 2022 · 0 comments

Comments

@Yannik
Copy link

Yannik commented Apr 4, 2022

There are 2 places where the primaries attribute of a zone is used:

tasks/zones.yml

(item.type is defined and item.type == 'primary') or
    (item.type is not defined and item.primaries is defined and
    (host_all_addresses | intersect(item.primaries) | length > 0))

(this code fragment is used for 3 tasks)

templates/etc_named.conf.j2

bind_zone.type is not defined and bind_zone.primaries is defined and (...)

As you can see, the primaries attribute is only evaluated if the type attribute is not defined.

However, this is currently not reflected in the assertion in tasks/main.yml:

  assert:
    that:
      - item.primaries is defined or item.forwarders is defined

Expected behavior for this assertion would be to pass, if item.type is set to primary.

Yannik added a commit to Yannik/ansible-role-bind that referenced this issue Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant