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

Same reverse (networks) for differents bind_zones #171

Open
roumano opened this issue Oct 7, 2021 · 0 comments
Open

Same reverse (networks) for differents bind_zones #171

roumano opened this issue Oct 7, 2021 · 0 comments

Comments

@roumano
Copy link

roumano commented Oct 7, 2021

Hi,

Actually the role is not working for same reverse (networks) for differents zone
Like this simplified exemple :

bind_zones:
- name: domain1.fr
  networks:
  - '127.0.0'
  - '127.0.1'
- name: domain2.fr
- name: domain3.fr
  networks:
  - '127.0.0'
  - '127.0.1'
- name: domain4.fr
  networks:
  - '127.0.3'

It's creating 2 different issues :

  • Duplicate reverse zone entry in /etc/bind/named.conf
    I already have a fix for this.
  • few tasks use sub_elements like this :
 with_subelements:
    - "{{ bind_zones }}"
    - networks
    - flags:
      skip_missing: true

As it's create unwanted loop iteration (it's erasing first data of the loop), reserve zone are badly created.
To fix it properly, i think it's should first create a dict or reverse zone like this :

reverse:
- name: 127.0.0
  domaine:
  - domain1.fr
  - domain3.fr
- name: 127.0.1
  domaine:
  - domain1.fr
  - domain3.fr
- name: 127.0.3
  domaine:
  - domain4.fr

Do you known, how it's can be done ?

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