mirror of
https://github.com/saltstack-formulas/bind-formula.git
synced 2025-04-16 17:50:23 +00:00
feat(yamllint): include for this repo and apply rules throughout
* Semi-automated using `ssf-formula` (v0.5.0) * Fix (or ignore) errors shown below: ```bash bind-formula$ $(grep "\- yamllint" .travis.yml | sed -e "s:^\s\+-\s\(.*\):\1:") pillar.example 1:1 warning comment not indented like content (comments-indentation) 1:89 error line too long (95 > 88 characters) (line-length) 2:1 warning missing document start "---" (document-start) 2:10 error wrong indentation: expected 0 but found 9 (indentation) 2:89 error line too long (103 > 88 characters) (line-length) 8:1 error syntax error: expected '<document start>', but found '<block mapping start>' 14:89 error line too long (94 > 88 characters) (line-length) 15:51 warning comment not indented like content (comments-indentation) 19:1 error duplication of key "bind" in mapping (key-duplicates) 21:89 error line too long (93 > 88 characters) (line-length) 23:89 error line too long (102 > 88 characters) (line-length) 27:89 error line too long (96 > 88 characters) (line-length) 32:89 error line too long (143 > 88 characters) (line-length) 33:89 error line too long (134 > 88 characters) (line-length) 35:24 error trailing spaces (trailing-spaces) 36:89 error line too long (91 > 88 characters) (line-length) 37:89 error line too long (93 > 88 characters) (line-length) 38:23 warning truthy value should be one of [false, true] (truthy) 39:27 warning truthy value should be one of [false, true] (truthy) 40:27 warning truthy value should be one of [false, true] (truthy) 44:23 warning truthy value should be one of [false, true] (truthy) 45:27 warning truthy value should be one of [false, true] (truthy) 46:27 warning truthy value should be one of [false, true] (truthy) 50:23 warning truthy value should be one of [false, true] (truthy) 51:27 warning truthy value should be one of [false, true] (truthy) 52:27 warning truthy value should be one of [false, true] (truthy) 55:23 warning truthy value should be one of [false, true] (truthy) 56:27 warning truthy value should be one of [false, true] (truthy) 57:27 warning truthy value should be one of [false, true] (truthy) 62:23 warning truthy value should be one of [false, true] (truthy) 63:27 warning truthy value should be one of [false, true] (truthy) 64:27 warning truthy value should be one of [false, true] (truthy) 89:89 error line too long (91 > 88 characters) (line-length) 90:1 warning comment not indented like content (comments-indentation) 97:1 warning comment not indented like content (comments-indentation) 98:89 error line too long (92 > 88 characters) (line-length) 99:51 warning comment not indented like content (comments-indentation) 99:89 error line too long (96 > 88 characters) (line-length) 102:1 warning comment not indented like content (comments-indentation) 102:35 error trailing spaces (trailing-spaces) 103:20 warning truthy value should be one of [false, true] (truthy) 103:89 error line too long (99 > 88 characters) (line-length) 104:51 warning comment not indented like content (comments-indentation) 106:89 error line too long (99 > 88 characters) (line-length) 109:40 error trailing spaces (trailing-spaces) 110:1 error duplication of key "bind" in mapping (key-duplicates) 113:89 error line too long (115 > 88 characters) (line-length) 115:89 error line too long (110 > 88 characters) (line-length) 116:13 error trailing spaces (trailing-spaces) 129:89 error line too long (120 > 88 characters) (line-length) 130:11 error trailing spaces (trailing-spaces) 150:81 error trailing spaces (trailing-spaces) 167:89 error line too long (118 > 88 characters) (line-length) 168:89 error line too long (101 > 88 characters) (line-length) 169:89 error line too long (103 > 88 characters) (line-length) 169:103 error trailing spaces (trailing-spaces) 170:89 error line too long (107 > 88 characters) (line-length) 170:107 error trailing spaces (trailing-spaces) 171:54 warning comment not indented like content (comments-indentation) 171:89 error line too long (120 > 88 characters) (line-length) 172:15 warning truthy value should be one of [false, true] (truthy) 172:89 error line too long (104 > 88 characters) (line-length) 174:21 error trailing spaces (trailing-spaces) 177:15 warning truthy value should be one of [false, true] (truthy) 178:19 error trailing spaces (trailing-spaces) 180:22 error trailing spaces (trailing-spaces) 186:24 warning truthy value should be one of [false, true] (truthy) 186:89 error line too long (124 > 88 characters) (line-length) 191:15 warning truthy value should be one of [false, true] (truthy) 193:89 error line too long (93 > 88 characters) (line-length) 193:93 error trailing spaces (trailing-spaces) 195:89 error line too long (101 > 88 characters) (line-length) 196:89 error line too long (104 > 88 characters) (line-length) 196:104 error trailing spaces (trailing-spaces) 197:15 warning truthy value should be one of [false, true] (truthy) 200:76 error trailing spaces (trailing-spaces) 206:89 error line too long (94 > 88 characters) (line-length) 208:89 error line too long (94 > 88 characters) (line-length) 209:89 error line too long (98 > 88 characters) (line-length) 213:36 error trailing spaces (trailing-spaces) 216:1 error duplication of key "bind" in mapping (key-duplicates) 218:25 warning truthy value should be one of [false, true] (truthy) 221:1 error too many blank lines (3 > 2) (empty-lines) 223:1 error duplication of key "bind" in mapping (key-duplicates) 231:15 warning truthy value should be one of [false, true] (truthy) 231:89 error line too long (98 > 88 characters) (line-length) 232:89 error line too long (94 > 88 characters) (line-length) 234:89 error line too long (98 > 88 characters) (line-length) 235:51 warning comment not indented like content (comments-indentation) 235:89 error line too long (107 > 88 characters) (line-length) 240:15 warning truthy value should be one of [false, true] (truthy) 240:89 error line too long (98 > 88 characters) (line-length) 241:15 warning truthy value should be one of [false, true] (truthy) 241:89 error line too long (101 > 88 characters) (line-length) 242:51 warning comment not indented like content (comments-indentation) 242:89 error line too long (97 > 88 characters) (line-length) 247:15 warning truthy value should be one of [false, true] (truthy) 247:89 error line too long (98 > 88 characters) (line-length) 248:89 error line too long (99 > 88 characters) (line-length) 249:51 warning comment not indented like content (comments-indentation) 249:89 error line too long (98 > 88 characters) (line-length) 253:15 warning truthy value should be one of [false, true] (truthy) 260:89 error line too long (99 > 88 characters) (line-length) 261:15 warning truthy value should be one of [false, true] (truthy) 271:89 error line too long (96 > 88 characters) (line-length) 284:89 error line too long (109 > 88 characters) (line-length) 285:51 warning comment not indented like content (comments-indentation) 285:89 error line too long (128 > 88 characters) (line-length) 286:89 error line too long (114 > 88 characters) (line-length) 287:89 error line too long (127 > 88 characters) (line-length) 289:89 error line too long (122 > 88 characters) (line-length) 290:89 error line too long (89 > 88 characters) (line-length) 291:89 error line too long (120 > 88 characters) (line-length) 292:89 error line too long (93 > 88 characters) (line-length) 293:19 warning truthy value should be one of [false, true] (truthy) 293:24 error trailing spaces (trailing-spaces) 300:89 error line too long (119 > 88 characters) (line-length) 301:51 warning comment not indented like content (comments-indentation) 301:89 error line too long (122 > 88 characters) (line-length) 302:89 error line too long (93 > 88 characters) (line-length) 305:1 error duplication of key "bind" in mapping (key-duplicates) 313:1 warning comment not indented like content (comments-indentation) 313:89 error line too long (99 > 88 characters) (line-length) 320:89 error line too long (89 > 88 characters) (line-length) 337:89 error line too long (95 > 88 characters) (line-length) 341:89 error line too long (120 > 88 characters) (line-length) 345:1 error too many blank lines (4 > 2) (empty-lines) 358:89 error line too long (89 > 88 characters) (line-length) 362:89 error line too long (117 > 88 characters) (line-length) 363:89 error line too long (89 > 88 characters) (line-length) 365:89 error line too long (102 > 88 characters) (line-length) 371:1 error duplication of key "bind" in mapping (key-duplicates) test/salt/pillar/default.sls 1:1 warning missing document start "---" (document-start) 11:15 warning truthy value should be one of [false, true] (truthy) 16:15 warning truthy value should be one of [false, true] (truthy) 19:15 warning truthy value should be one of [false, true] (truthy) 28:15 warning truthy value should be one of [false, true] (truthy) 114:1 error too many blank lines (1 > 0) (empty-lines) ```
This commit is contained in:
parent
d5d11a48b6
commit
a81c9ffd3a
5 changed files with 93 additions and 59 deletions
13
.travis.yml
13
.travis.yml
|
@ -3,7 +3,7 @@
|
||||||
---
|
---
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- commitlint
|
- lint
|
||||||
- name: release
|
- name: release
|
||||||
if: branch = master AND type != pull_request
|
if: branch = master AND type != pull_request
|
||||||
|
|
||||||
|
@ -45,16 +45,21 @@ script:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
# Define the commitlint stage
|
# Define the `lint` stage (runs `yamllint` and `commitlint`)
|
||||||
- stage: commitlint
|
- stage: lint
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: lts/*
|
node_js: lts/*
|
||||||
before_install: skip
|
before_install: skip
|
||||||
script:
|
script:
|
||||||
|
# Install and run `yamllint`
|
||||||
|
- pip install --user yamllint
|
||||||
|
# yamllint disable-line rule:line-length
|
||||||
|
- yamllint -s . .yamllint pillar.example test/salt/pillar/default.sls
|
||||||
|
# Install and run `commitlint`
|
||||||
- npm install @commitlint/config-conventional -D
|
- npm install @commitlint/config-conventional -D
|
||||||
- npm install @commitlint/travis-cli -D
|
- npm install @commitlint/travis-cli -D
|
||||||
- commitlint-travis
|
- commitlint-travis
|
||||||
# Define the release stage that runs semantic-release
|
# Define the release stage that runs `semantic-release`
|
||||||
- stage: release
|
- stage: release
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js: lts/*
|
node_js: lts/*
|
||||||
|
|
24
.yamllint
Normal file
24
.yamllint
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
|
# Extend the `default` configuration provided by `yamllint`
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
# Files to ignore completely
|
||||||
|
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
|
||||||
|
ignore: |
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
rules:
|
||||||
|
comments-indentation:
|
||||||
|
ignore: |
|
||||||
|
pillar.example
|
||||||
|
key-duplicates:
|
||||||
|
ignore: |
|
||||||
|
pillar.example
|
||||||
|
line-length:
|
||||||
|
ignore: |
|
||||||
|
pillar.example
|
||||||
|
# Increase from default of `80`
|
||||||
|
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
|
||||||
|
max: 88
|
|
@ -1,6 +1,9 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
# Note - Each section beginning with 'bind:' below represents a different way you may configure
|
# Note - Each section beginning with 'bind:' below represents a different way you may configure
|
||||||
pillars for bind. When configuring your pillar(s), you may use any combination of subsections,
|
# pillars for bind. When configuring your pillar(s), you may use any combination of subsections,
|
||||||
but salt will not merge sections with the same heading.
|
# but salt will not merge sections with the same heading.
|
||||||
|
|
||||||
|
|
||||||
### Overrides for the defaults specified by ###
|
### Overrides for the defaults specified by ###
|
||||||
|
@ -35,33 +38,33 @@ bind:
|
||||||
file: default
|
file: default
|
||||||
size: '200m' # size of a individual file (default 20m)
|
size: '200m' # size of a individual file (default 20m)
|
||||||
versions: '10' # how many files will be stored (default 3)
|
versions: '10' # how many files will be stored (default 3)
|
||||||
print-time: yes
|
print-time: true
|
||||||
print-category: yes
|
print-category: true
|
||||||
print-severity: yes
|
print-severity: true
|
||||||
severity: info
|
severity: info
|
||||||
queries_log:
|
queries_log:
|
||||||
file: queries
|
file: queries
|
||||||
print-time: yes
|
print-time: true
|
||||||
print-category: yes
|
print-category: true
|
||||||
print-severity: yes
|
print-severity: true
|
||||||
severity: info
|
severity: info
|
||||||
query-errors_log:
|
query-errors_log:
|
||||||
file: query-errors
|
file: query-errors
|
||||||
print-time: yes
|
print-time: true
|
||||||
print-category: yes
|
print-category: true
|
||||||
print-severity: yes
|
print-severity: true
|
||||||
severity: dynamic
|
severity: dynamic
|
||||||
default_syslog:
|
default_syslog:
|
||||||
print-time: yes
|
print-time: true
|
||||||
print-category: yes
|
print-category: true
|
||||||
print-severity: yes
|
print-severity: true
|
||||||
syslog: daemon
|
syslog: daemon
|
||||||
severity: info
|
severity: info
|
||||||
default_debug:
|
default_debug:
|
||||||
file: named.run
|
file: named.run
|
||||||
print-time: yes
|
print-time: true
|
||||||
print-category: yes
|
print-category: true
|
||||||
print-severity: yes
|
print-severity: true
|
||||||
severity: info
|
severity: info
|
||||||
category:
|
category:
|
||||||
default:
|
default:
|
||||||
|
@ -100,8 +103,8 @@ bind:
|
||||||
# binds default of both.
|
# binds default of both.
|
||||||
|
|
||||||
# Debian and FreeBSD based systems
|
# Debian and FreeBSD based systems
|
||||||
default_zones: True # If set to True, the default-zones configuration
|
default_zones: true # If set to true, the default-zones configuration
|
||||||
# will be enabled. Defaults to False.
|
# will be enabled. Defaults to false.
|
||||||
|
|
||||||
includes: # Include any additional configuration file(s) in
|
includes: # Include any additional configuration file(s) in
|
||||||
- /some/additional/named.conf # named.conf
|
- /some/additional/named.conf # named.conf
|
||||||
|
@ -169,12 +172,12 @@ bind:
|
||||||
file: sub.domain.com # You can optionally specify name of a file here.
|
file: sub.domain.com # You can optionally specify name of a file here.
|
||||||
type: master # Yo don't have define zone again in available_zones.
|
type: master # Yo don't have define zone again in available_zones.
|
||||||
# This feature is backward compatibile and only available in debian
|
# This feature is backward compatibile and only available in debian
|
||||||
notify: False # if type master you need specify notify True/False
|
notify: false # if type master you need specify notify true/false
|
||||||
|
|
||||||
sub2.domain.com:
|
sub2.domain.com:
|
||||||
file: sub2.domain.com
|
file: sub2.domain.com
|
||||||
type: master
|
type: master
|
||||||
notify: True
|
notify: true
|
||||||
allow-query:
|
allow-query:
|
||||||
- any
|
- any
|
||||||
allow-transfer:
|
allow-transfer:
|
||||||
|
@ -183,18 +186,18 @@ bind:
|
||||||
also-notify:
|
also-notify:
|
||||||
- 1.2.3.4
|
- 1.2.3.4
|
||||||
- 1.2.3.3
|
- 1.2.3.3
|
||||||
zone-statistics: yes # Enable detailed statistics for zone. You need enable statistics first
|
zone-statistics: true # Enable detailed statistics for zone. You need enable statistics first
|
||||||
|
|
||||||
test.zone.com:
|
test.zone.com:
|
||||||
file: test.zone.com
|
file: test.zone.com
|
||||||
type: slave
|
type: slave
|
||||||
notify: False
|
notify: false
|
||||||
masters:
|
masters:
|
||||||
- my_dns_masters # You can specify masters by using name
|
- my_dns_masters # You can specify masters by using name
|
||||||
|
|
||||||
test.zone2.com: # Zone definied in default style of this formula
|
test.zone2.com: # Zone definied in default style of this formula
|
||||||
type: slave # You need specify all info inside available_zones
|
type: slave # You need specify all info inside available_zones
|
||||||
notify: False
|
notify: false
|
||||||
|
|
||||||
|
|
||||||
configured_masters: # Configure master dns
|
configured_masters: # Configure master dns
|
||||||
|
@ -215,8 +218,7 @@ bind:
|
||||||
# on SUSE include the forwarders.conf file generated by netconfig(8)
|
# on SUSE include the forwarders.conf file generated by netconfig(8)
|
||||||
bind:
|
bind:
|
||||||
config:
|
config:
|
||||||
include_forwarders: True
|
include_forwarders: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Keys, Zones, ACLs and Views ###
|
### Keys, Zones, ACLs and Views ###
|
||||||
|
@ -228,7 +230,7 @@ bind:
|
||||||
configured_zones:
|
configured_zones:
|
||||||
sub.domain.com: # First domain zone
|
sub.domain.com: # First domain zone
|
||||||
type: master # We're the master of this zone
|
type: master # We're the master of this zone
|
||||||
notify: False # Don't notify any NS RRs of any changes to zone
|
notify: false # Don't notify any NS RRs of any changes to zone
|
||||||
also-notify: # Do notify these IP addresses (pointless as
|
also-notify: # Do notify these IP addresses (pointless as
|
||||||
- 1.1.1.1 # notify has been set to no)
|
- 1.1.1.1 # notify has been set to no)
|
||||||
- 2.2.2.2 # If using views, do not define configured_zones
|
- 2.2.2.2 # If using views, do not define configured_zones
|
||||||
|
@ -237,20 +239,20 @@ bind:
|
||||||
|
|
||||||
sub.domain2.com: # Domain zone with DNSSEC
|
sub.domain2.com: # Domain zone with DNSSEC
|
||||||
type: master # We're the master of this zone
|
type: master # We're the master of this zone
|
||||||
notify: False # Don't notify any NS RRs of any changes to zone
|
notify: false # Don't notify any NS RRs of any changes to zone
|
||||||
dnssec: True # Create and manage signed zonefile with zonesigner
|
dnssec: true # Create and manage signed zonefile with zonesigner
|
||||||
# You will have to install dnssec-tools by hand
|
# You will have to install dnssec-tools by hand
|
||||||
# on many distributions
|
# on many distributions
|
||||||
|
|
||||||
sub.domain3.com: # Domain zone with DNSSEC
|
sub.domain3.com: # Domain zone with DNSSEC
|
||||||
type: master # We're the master of this zone
|
type: master # We're the master of this zone
|
||||||
notify: False # Don't notify any NS RRs of any changes to zone
|
notify: false # Don't notify any NS RRs of any changes to zone
|
||||||
auto-dnssec: 'maintain' # Bind will create and manage the signed zonefile
|
auto-dnssec: 'maintain' # Bind will create and manage the signed zonefile
|
||||||
# itself, we only have to provide the clear zone
|
# itself, we only have to provide the clear zone
|
||||||
|
|
||||||
1.168.192.in-addr.arpa: # Reverse lookup for local IPs
|
1.168.192.in-addr.arpa: # Reverse lookup for local IPs
|
||||||
type: master # As above
|
type: master # As above
|
||||||
notify: False # As above
|
notify: false # As above
|
||||||
allow-transfer: # As above
|
allow-transfer: # As above
|
||||||
- 1.1.1.1
|
- 1.1.1.1
|
||||||
- 2.2.2.2
|
- 2.2.2.2
|
||||||
|
@ -258,7 +260,7 @@ bind:
|
||||||
dynamic.domain.com: # Our ddns zone
|
dynamic.domain.com: # Our ddns zone
|
||||||
type: master # As above
|
type: master # As above
|
||||||
allow-update: "key core_dhcp" # Who we allow updates from (refers to above key)
|
allow-update: "key core_dhcp" # Who we allow updates from (refers to above key)
|
||||||
notify: True # Notify NS RRs of changes
|
notify: true # Notify NS RRs of changes
|
||||||
|
|
||||||
sub.anotherdomain.com: # Another domain zone
|
sub.anotherdomain.com: # Another domain zone
|
||||||
type: forward # This time it's a forwarding zone
|
type: forward # This time it's a forwarding zone
|
||||||
|
@ -290,7 +292,7 @@ bind:
|
||||||
# serve a different record set in each.
|
# serve a different record set in each.
|
||||||
# If doing this, you need to configure the zones and their record sets
|
# If doing this, you need to configure the zones and their record sets
|
||||||
# underneath the 'available_zones' section.
|
# underneath the 'available_zones' section.
|
||||||
notify: False
|
notify: false
|
||||||
update_policy: # A given update policy
|
update_policy: # A given update policy
|
||||||
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
|
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
|
||||||
|
|
||||||
|
@ -341,8 +343,6 @@ bind:
|
||||||
_dmarc: '"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; fo=1:d:s; adkim=r; aspf=r; pct=100; ri=86400"'
|
_dmarc: '"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; fo=1:d:s; adkim=r; aspf=r; pct=100; ri=86400"'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3.2.1.in-addr.arpa: # auto-generated reverse zone
|
3.2.1.in-addr.arpa: # auto-generated reverse zone
|
||||||
file: example.com.rev.txt
|
file: example.com.rev.txt
|
||||||
soa: # Declare the SOA RRs for the zone
|
soa: # Declare the SOA RRs for the zone
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
name: default
|
name: default
|
||||||
title: bind formula
|
title: bind formula
|
||||||
maintainer: SaltStack Formulas
|
maintainer: SaltStack Formulas
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=yaml
|
||||||
|
---
|
||||||
bind:
|
bind:
|
||||||
configured_acls:
|
configured_acls:
|
||||||
client1:
|
client1:
|
||||||
|
@ -8,15 +11,15 @@ bind:
|
||||||
configured_zones:
|
configured_zones:
|
||||||
example.com:
|
example.com:
|
||||||
type: master
|
type: master
|
||||||
notify: False
|
notify: false
|
||||||
update_policy:
|
update_policy:
|
||||||
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
|
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
|
||||||
example.net:
|
example.net:
|
||||||
type: master
|
type: master
|
||||||
notify: False
|
notify: false
|
||||||
example.org:
|
example.org:
|
||||||
type: slave
|
type: slave
|
||||||
notify: False
|
notify: false
|
||||||
masters:
|
masters:
|
||||||
- 192.0.2.1
|
- 192.0.2.1
|
||||||
- 192.0.2.2
|
- 192.0.2.2
|
||||||
|
@ -25,7 +28,7 @@ bind:
|
||||||
notify: false
|
notify: false
|
||||||
100.51.198.in-addr.arpa:
|
100.51.198.in-addr.arpa:
|
||||||
type: master
|
type: master
|
||||||
notify: False
|
notify: false
|
||||||
available_zones:
|
available_zones:
|
||||||
example.net:
|
example.net:
|
||||||
file: example.net
|
file: example.net
|
||||||
|
@ -111,4 +114,3 @@ bind:
|
||||||
net: 198.51.100.0/24
|
net: 198.51.100.0/24
|
||||||
for_zones:
|
for_zones:
|
||||||
- example.net
|
- example.net
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue