2019-02-18 22:36:09 +01:00
|
|
|
---
|
2018-10-07 12:57:36 +02:00
|
|
|
- name: copy private key
|
2017-10-08 14:55:01 +02:00
|
|
|
copy:
|
2019-02-18 22:36:09 +01:00
|
|
|
dest: "/etc/bind/keys/K{{ item.0 }}.\
|
|
|
|
+{{ '00{}'.format(bind_dnssec[item.0][item.1].algorithm)[-3:] }}\
|
|
|
|
+{{ bind_dnssec[item.0][item.1].tag }}.private"
|
2018-10-07 12:57:36 +02:00
|
|
|
content: '{{ bind_dnssec[item.0][item.1].private_key }}'
|
2017-10-08 14:55:01 +02:00
|
|
|
owner: root
|
|
|
|
group: bind
|
|
|
|
mode: 0640
|
2018-12-05 10:16:43 +01:00
|
|
|
no_log: true
|
|
|
|
loop: '{{ bind_dnssec|product(file_ext)|list }}'
|
|
|
|
vars:
|
|
|
|
file_ext:
|
|
|
|
- ksk
|
|
|
|
- zsk
|
2017-10-08 14:55:01 +02:00
|
|
|
|
2018-10-07 12:57:36 +02:00
|
|
|
- name: copy public key
|
|
|
|
template:
|
|
|
|
src: public.key.j2
|
2019-02-18 22:36:09 +01:00
|
|
|
dest: "/etc/bind/keys/K{{ item.0 }}.\
|
|
|
|
+{{ '00{}'.format(bind_dnssec[item.0][item.1].algorithm)[-3:] }}\
|
|
|
|
+{{ bind_dnssec[item.0][item.1].tag }}.key"
|
2017-10-08 14:55:01 +02:00
|
|
|
owner: root
|
|
|
|
group: bind
|
|
|
|
mode: 0640
|
2018-12-05 10:16:43 +01:00
|
|
|
no_log: true
|
|
|
|
loop: '{{ bind_dnssec|product(file_ext)|list }}'
|
|
|
|
vars:
|
|
|
|
file_ext:
|
|
|
|
- ksk
|
|
|
|
- zsk
|