summaryrefslogtreecommitdiffstats
path: root/distro/tests/ansible-roles/knot_dns/tasks/configure_zone.yaml
blob: c6cce014b6703c031e73da71c6e8c5c6baf80898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
- name: create example.com zone
  copy:
    dest: /etc/knot/example.com.zone
    mode: 0644
    content: |
      $ORIGIN example.com.
      $TTL 3600
      @	SOA	dns1.example.com. hostmaster.example.com. (
          2010111213	; serial
          6h		; refresh
          1h		; retry
          1w		; expire
          1d )		; minimum
        NS	dns1
      dns1	A	192.0.2.1

- name: create config
  blockinfile:
    dest: /etc/knot/knot.conf
    block: |
      zone:
        - domain: example.com
          file: "/etc/knot/example.com.zone"