stuvusIT.pdns-authoritative-api
pdns-authoritative-api
Ten zestaw ról Ansible zarządza strefami DNS za pomocą API HTTP PowerDNS.
Wymagania
Debian lub Ubuntu
Zmienne Roli
Nazwa | Domyślna/Wymagana | Opis |
---|---|---|
pdns_auth_api_connect |
:heavy_check_mark: | Połączenie z tym adresem URL (np. http://127.0.0.1:1234 ) |
pdns_auth_api_server |
localhost |
Serwer do którego się łączymy |
pdns_auth_api_key |
:heavy_check_mark: | Klucz API do użycia (może być pusty, jeśli go nie masz) |
pdns_auth_api_zones |
:heavy_check_mark: | Słownik nazw z zawartością stref DNS (patrz poniżej) |
pdns_auth_api_remove_unknown_zones |
false |
Usuń strefy, które nie są znane tej roli |
pdns_auth_api_default_metadata |
Domyślne metadane, które mogą być nadpisane dla każdej strefy |
Strefy DNS
Nazwa | Domyślna/Wymagana | Opis |
---|---|---|
kind |
Master |
Typ tej strefy (Master , Slave lub Native ) |
soaEdit |
(:heavy_check_mark:) | (nie dla stref typu Slave) Wartość SOA-EDIT dla tej strefy |
soaEditApi |
({{soaEdit}} |
(nie dla stref typu Slave) Wartość SOA-EDIT-API |
dnssec |
false |
(nie dla stref typu Slave) Włącz DNSSEC i NSEC3 dla tej strefy |
presigned |
false |
(nie dla stref typu Slave) Czy strefa jest wstępnie podpisana i nie musi być podpisana przez PowerDNS |
apiRectify |
true |
(nie dla stref typu Slave) Czy automatycznie korygować na zmiany za pośrednictwem API |
nsec3Param |
(nie dla stref typu Slave) Wartość rekordu NSEC3PARAM | |
nsec3Narrow |
false |
(nie dla stref typu Slave) Czy używać NSEC3 w trybie wąskim (białe kłamstwa) |
masters |
(:heavy_check_mark:) | Lista serwerów głównych tej strefy |
records |
nie dla stref typu Slave | Lista wszystkich rekordów w tej strefie (patrz poniżej) |
defaultTTL |
(:heavy_check_mark:) | (nie dla stref typu Slave) TTL dla wszystkich zestawów RR, dla których nie ustalono TTL |
metadata |
Słownik z metadanymi domeny. Elementy, które znajdują się w bazie danych, ale nie tutaj, są usuwane |
Rekordy
Ta rola automatycznie sortuje rekordy o tej samej nazwie i typie w zestawy RR.
Każdy rekord może ustawić zawartość (c
) lub może ustawić TTL, który dotyczy całego zestawu RR (t
).
Rekordy są grupowane według typów, które są dalej grupowane według nazw. Zobacz przykład poniżej. Nieznane zestawy RR są usuwane.
Jeśli rekord SOA ma AUTO
jako swój numer seryjny, aktualna wartość z bieżącej strefy jest używana.
Jest to przydatne przy ustawianiu soaEditApi
, aby automatycznie inkrementować numer seryjny.
Zawartość
Nazwa | Domyślna/Wymagana | Opis |
---|---|---|
c |
(:heavy_check_mark:) | Zawartość tego rekordu. Musi być pominięta, gdy t jest ustawione |
t |
(:heavy_check_mark:) | TTL tego zestawu RR. Musi być pominięte, gdy c jest ustawione |
r |
Ustaw także rekord PTR w strefie odwrotnej |
Przykładowy Playbook
- hosts: dns
roles:
- pdns-authoritative-api
pdns_auth_api_connect: 'http://127.0.0.1:1234'
pdns_auth_api_key: 'secretsecretkey'
pdns_auth_api_zones:
- name: example.com
dnssec: true
nsec3Salt: abab
defaultNameservers:
- ns1.example.com
- ns2.example.com
metadata:
ALLOW-AXFR-FROM:
- AUTO-NS
- 2001:db8::/48
records:
example.com:
SOA:
- c: ns1.example.com admin.example.com AUTO 3600 1800 604800 600
NS:
- c: ns1.example.com.
- c: ns2.example.com.
- t: 15200
ns1.example.com:
A:
- c: 10.0.0.2
r: True
AAAA:
- c: fe80::1
r: True
Licencja
Ta praca jest licencjonowana na mocy Creative Commons Attribution-ShareAlike 4.0 International License.
Informacje o autorze
Zainstaluj
ansible-galaxy install stuvusIT.pdns-authoritative-api
Licencja
other
Pobrania
167
Właściciel
stuvus IT Team - Studierendenvertretung Universität Stuttgart