Skip to content

Commit

Permalink
fixing typos and anslible-lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ulvida committed Jul 3, 2022
1 parent f1c0aff commit 1e1d0c5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Lest's start by a simple but complete configuration of two servers:

* set vars for your master server, for instance in `host_vars/master_name/vars/XX_bind.yml`, here with an example.com static zone and forwarder:
```yaml
bind9_authoritative: yes
bind9_authoritative: true
bind9_zones_static:
- { name: example.com , type=master }
bind9_forward: yes
bind9_forward: true
bind9_forward_servers:
- 8.8.8.8
- 4.4.4.4
Expand All @@ -60,7 +60,7 @@ bind9_our_neighbors:
```yaml
bind9_zones_static:
- { name: example.com, type: slave }
bind9_forward: yes
bind9_forward: true
bind9_forward_servers:
- 8.8.8.8
- 4.4.4.4
Expand Down
30 changes: 15 additions & 15 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bind9_notify_explicit: no
bind9_zone_type: master

## //!\\ Several of the following variables have different meanings or (no meaning at all) depending on the templates' set you use
## See here after bind9_template variable.
## See here after bind9_template variable.

# Permitted hosts/networks for recursion (when configured as recursor)
# variable used only by default templates, not strict_authoritative
Expand Down Expand Up @@ -84,7 +84,7 @@ bind9_rndc_algorithm: hmac-md5
# Let's progressively rename this variable with bind's preferred terminology:
# bind9_secondaries: "{{ bind9_slaves }}"

# bind9_acl:
# bind9_acl:
# undefined by default, this variable allows to define a set of several access control lists (ACL)
# with the same format as `bind9_masters`, and use it in slaves. allow-query or allow-transfer definitions

Expand All @@ -94,19 +94,19 @@ bind9_rndc_algorithm: hmac-md5
# bind9_also_allow_transfer:
# bind9_also_allow_transfer: '{{ bind9_also_notify if bind9_also_notify is defined else undef }}'
# defaults to bind9_also_notify, but this definitio must be overwritten if this vairable contains masters names.
# As far as bind9_also_notify is just a list of IPs, default values of the role take advantage of the similar strucuture
# in YAML for lasters lists and ACLs, and the can by default allow transfer, zone by zone, to slaves and also notify IPS
# As far as bind9_also_notify is just a list of IPs, default values of the role take advantage of the similar strucuture
# in YAML for lasters lists and ACLs, and the can by default allow transfer, zone by zone, to slaves and also notify IPS

# bind9_also_allow_transfer
#bind9_also_allow_transfer: '{{ bind9_also_notify if bind9_also_notify is defined else undef }}'
# for primary zones, except if `allow_transfer` is explicitly defined for the zone, by default an `allow-transfer` list
# will be set, iincluding slave NS of the host and either the list also_allow_transfer defined for the zone, either this
# default list.
# If `bind9_also_notify` is defined by default `bind9_also_allow_transfer` has the same values.
# But be carefull: in BIND9 configuration, `also-notify` may include `masters` lists but not `acl` ones, while
# default list.
# If `bind9_also_notify` is defined by default `bind9_also_allow_transfer` has the same values.
# But be carefull: in BIND9 configuration, `also-notify` may include `masters` lists but not `acl` ones, while
# `allow-transfer` may include `acl` lists but not `masters` ones. In YAML role's variables structures are identical, but
# if they appear in BIND configuration list inclusions it will fail.
# Practically: if you use `masters` lists (defined with `bind9_masters`or `bind9_masters_extra` variables of this role),
# if they appear in BIND configuration list inclusions it will fail.
# Practically: if you use `masters` lists (defined with `bind9_masters`or `bind9_masters_extra` variables of this role),
# yo must re-define separately `bind9_also_allow_transfer`, probably defining an ACL with same values than master lists.

# Enable BIND's XML statistics-channels (for monitoring purposes)
Expand All @@ -121,7 +121,7 @@ bind9_zones_static: []

# With this value, the `copy` module will look for zone files in `files/bind/zones/` in the playbook directory
bind9_zone_files: bind/zones/
# Overwrite, for instance if you want to put your db.* zone files in your host vars:
# Overwrite, for instance if you want to put your db.* zone files in your host vars:
# bind9_zone_files: '{{ playbook_dir }}/host_vars/{{ ansible_hostname }}/files/bind/zones/'

# Authoritative include files
Expand Down Expand Up @@ -163,13 +163,13 @@ bind9_packages:
# Directory for bind9 files templates
bind9_templates: ""
# The role can handle different sets of templates for bind and zones configuration.
# It presently proposes two sets of templates:
# * the defaults one, "", wich is a general purpose configuration set, that has evolved with the role.
# It presently proposes two sets of templates:
# * the defaults one, "", wich is a general purpose configuration set, that has evolved with the role.
# It's files live in {{ role_path }}/templates/ directory
# * a second new set for a strict authoritative bind NS server: `strict_authoritative` It accepts DNS queries only for zones it is authoritative for.
# allow-transfer for secunday NS servers, notify-also for hidden slaves, and even allow-query and notify can be defined zone by zone.
# * a second new set for a strict authoritative bind NS server: `strict_authoritative` It accepts DNS queries only for zones it is authoritative for.
# allow-transfer for secunday NS servers, notify-also for hidden slaves, and even allow-query and notify can be defined zone by zone.
# It's files live in {{ role_path }}/templates/strict_authoritative/ directory
# Note that several default variables `bind9_*` have different meanings than with default templates' set.
# Note that several default variables `bind9_*` have different meanings than with default templates' set.
# bind9_templates nust be set as a relative or absolute directory, including it's trailing "/":
# bind9_templates: strict_authoritative/
# You can set your own templates, for example with:
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ galaxy_info:
description: Role to install and maintain the Bind9 nameserver on Debian
company: systemli.org
license: GPLv3
min_ansible_version: 2.4
min_ansible_version: '2.10'
galaxy_tags:
- bind9
- dns
Expand Down
9 changes: 6 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
notify:
- restart bind9

- block:
- name: bind9 logs configuration
block:
- name: ensure existence of the log directory
file:
path: "{{ bind9_log_path }}"
Expand Down Expand Up @@ -143,7 +144,8 @@
- item.type|default(bind9_zone_type) == 'master'
- item.update_keyfile|default()

- debug:
- name: view zones
debug:
var: item
verbosity: 2
with_items:
Expand Down Expand Up @@ -171,7 +173,8 @@
- role:bind9:dnssec

# Filter out all skipped results (e.g. if item.dnssec is set to False)
- set_fact:
- name: set bind9_reg_dnssec_keys fact
set_fact:
bind9_reg_dnssec_keys: "{{ bind9_reg_dnssec_keys_tmp.results|selectattr('skipped', 'undefined')|list }}"

- name: generate bind9 key signing keys for zones
Expand Down

0 comments on commit 1e1d0c5

Please sign in to comment.